|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by dsabine in C# Programming Language, WebApplications
I am getting lost to why this is not working. The email is sending perfectly to the message.TO person how ever it is not sending to the BCC people. My code is below can someone look at this and let me know why it is not sending to the BCC people?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
|
public static void Send(string mailto, string subject, string body)
{
try
{
MailMessage message = new MailMessage();
message.From = new MailAddress(adminMail);
message.IsBodyHtml = true;
message.To.Add(new MailAddress(mailto));
message.Bcc.Add(new MailAddress("blackboxgirlsorder2@gmail.com"));
message.Bcc.Add(new MailAddress("orders-hlding@blackboxgirls.com"));
message.Bcc.Add(new MailAddress("orders@blackboxgirls.com"));
message.Bcc.Add(new MailAddress("KevinC@frontlinecallcenter.com"));
message.Subject = subject;
message.Body = body;
SmtpClient client = new SmtpClient(host);
client.UseDefaultCredentials = true;
client.Send(message);
}
catch(Exception ex)
{
if (mailto != adminMail)
{
SendMail.Send(adminMail, "Mail Error", "Can not send mail. " + ex.ToString());
}
}
}
|
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625