如何在不使用循环概念的情况下发送批量邮件 [英] How to send Bulk mail without using loop Concepts

查看:129
本文介绍了如何在不使用循环概念的情况下发送批量邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一次发送10000封邮件,而不是使用foreach,因为,虽然在asp.net中有概念。有什么方法可以做吗?任何人都可以帮助我吗?通过使用for循环它需要超过1小时1000邮件。

I want to send 10000 mails at a time without using foreach,for,while concept in asp.net.Is there any way to do?Any one can help me?By Using for loop it taking more than 1 hour for 1000 mails.

推荐答案

您可以使用 To [ ^ ]属性,它是MailAddress对象的集合...但是发送一堆很多的电子邮件可以很容易地让你在垃圾邮件列表中...



/ DamithSL /

您也可以使用密送 [ ^ ]属性以同样的方式,在这种情况下接收者不会看到其他邮件地址...
You can add multiple addresses to a single MailMessage object using the To[^] property, which is a collection of MailAddress objects...However sending that much emails in one bunch can get you on spammer's list very easily...

/DamithSL/
You can use also Bcc[^] property in the very same way, in which case receivers will not see others mail address...


你可以使用SmtpClient.SendAsync方法(MailMessage,对象) [ ^ ]。

You can use SmtpClient.SendAsync Method (MailMessage, Object)[^].
Quote:

将指定的电子邮件发送到SMTP服务器以进行传递。此方法不会阻止调用线程,并允许调用者将对象传递给操作完成时调用的方法。

Sends the specified e-mail message to an SMTP server for delivery. This method does not block the calling thread and allows the caller to pass an object to the method that is invoked when the operation completes.


这篇关于如何在不使用循环概念的情况下发送批量邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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