使用System.Web.Mail.MailMessage发送的邮件 [英] mail sent using System.Web.Mail.MailMessage
本文介绍了使用System.Web.Mail.MailMessage发送的邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
System.Web.Mail.MailMessage myMail = new System.Web.Mail.MailMessage();
...
....
...
myMail.Bcc = List of address;
myMail.From = send from address;
SmtpMail.Send(myMail);
我尝试发送邮件使用上面的代码,在这里我只设置BCC字段,而不是设置收件人字段
这个已发送给所有收件人,但他们没有在该邮件上看到的收件人地址?
如何在没有设置收件人字段的情况下显示收件人邮件地址?
谢谢提前。
I try to send mail using above code , here i set only "BCC" field, not set "To" field
This delivered to all recipient but their is no recipient address seen on that mail?
How can i show recipient mail address with out setting "To" field?
Thanks in advance .
推荐答案
希望这能解决您的问题。
Hope that this will solve your problem.
Dim toAddressList As String = "tomail1@gmail.com,tomail2@gmail.com,tomail3@gmail.com,tomailn@gmail.com"
' be the list of to address seperated by commas
Dim toCClist As String = "tomail1@gmail.com,tomail2@gmail.com,tomail3@gmail.com,tomailn@gmail.com"
' be the list of CC seperated by commas
Dim toBCClist As String = "tomail1@gmail.com,tomail2@gmail.com,tomail3@gmail.com,tomailn@gmail.com"
' be the list of BCC seperated by commas
myMail.AddMultipleCC(toCClist) '<-- adding multiple CC to your mail message
myMail.AddMultipleBcc(toBCClist)'<-- adding multiple BCC to your mail message
myMail.AddMultipleTo(toAddressList)'<-- adding multiple To addressto your mail message
现在执行查询,这将正常工作。感谢您花时间阅读本文。
Now execute the query this will work fine. thanks for spending your time to read this.
这篇关于使用System.Web.Mail.MailMessage发送的邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文