如何发送批量电子邮件? [英] How to send bulk emails ?

查看:309
本文介绍了如何发送批量电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个使用System.Net.Mail发送批量电子邮件的应用程序.为了提高发送大量电子邮件的性能和速度,我使用了多线程(multi SmtpClient),每个对象都调用SendAsync方法来异步发送电子邮件.

i've created an application which used System.Net.Mail to send bulk email. to increase performance and speed of sending a huge list of emails, i've used multi Thread (multi SmtpClient) that each object call SendAsync method to perform sending emails Asyncronousely.

这还不错,但是我想优化发送电子邮件的速度.为此,我已经检查了我的互联网带宽,因为电子邮件正在发送,它没有使用所有带宽来发送电子邮件.假设我的互联网带宽为128kb,则仅使用20kb.

it's not to bad, but i want to optimize speed of sending email. to do this, i've checked out my internet bandwidth since emails are being sending, it does not use all of bandwidth to send email. suppose if my internet bandwidth is 128kb, it use only 20kb.

有人可以帮助我,给我任何提高邮件发送速度的想法吗?

can anybody help me and give me any idea to increase speed of sending email ?

事先感谢

推荐答案

你好,

 

只需在不同的线程上发送所有电子邮件即可.我建议使用 为此,将ThreadPool 设置为最大线程数.

Just send all the emails on different threads. I would suggest using ThreadPool for this with a maximum number of threads set to a big number.

有关如何使用线程池的更多信息,请查看此 文章

For more information on how to use thread pool check out this article

 

希望这会有所帮助,如果您还有其他问题或意见,请告诉我,

最好的问候,
伊曼纽尔·瓦尔加(Emanuel Varga)

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga


这篇关于如何发送批量电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆