Click here to Skip to main content
15,901,505 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
System.Web.Mail.MailMessage myMail = new System.Web.Mail.MailMessage();
...
....
...
myMail.Bcc = List of address;
myMail.From = send from address;

SmtpMail.Send(myMail);



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 .
Posted
Updated 27-Jan-15 18:28pm
v2
Comments
Rob Philpott 21-Jan-15 6:48am    
I think that's standard. When you bcc to a group the To: field is empty. It's actually transmitted as part of the message. I believe you'd need to send separate emails to each of the recipients.
Richard MacCutchan 21-Jan-15 9:21am    
BCC stands for Blind Carbon Copy, from the good old days of mechanical typewriters. It means send to these recipents but do not show their names or addresses.
Varun_Kumar 21-Jan-15 22:56pm    
Suppose we sent to user1 and user2 using BCC. Then user1 didn't know about user2. After checking user1's mail, we can see taht user1 mail id in their address field (see from normal mail like LotusNote). How can i display their own id inn address field using BCC?

1 solution

Hope that this will solve your problem.

VB
       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.
 
Share this answer
 
Comments
Varun_Kumar 28-Jan-15 4:06am    
Hi sujith,
Thanks for your replay
Here i have only BCC field, Did you check with that?So you just give only BCC field and check in receiver side , her/his address is shown or not?Remember that System.Web.Mail.MailMessage used here.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900