hi,
i wanted to send 2 different email that is 2 different email address,with to different messages in asp.net c# 2.0.
by using Cc i can send to different email Address but how to different messages

Try this link

it didn't help me

That link should suffice. You have to show some effort from your side by using those example's. Just don't blindly ask for the code.

Show us how far you have implemented with your code.

hi,
i wanted to send 2 different email that is 2 different email address,with to different messages in asp.net c# 2.0.
by using Cc i can send to different email Address but how to different messages

This doesn't make sense. You can't send two *different* email bodies to two addresses using the CC (Carbon Copy) field. (That's nothing to do with C#, that's just how email works)

You have to send two *whole* emails.

Please post your email code, we can then tell you what you need to do/change to make it work.

Thanks.

This doesn't make sense. You can't send two *different* email bodies to two addresses using the CC (Carbon Copy) field. (That's nothing to do with C#, that's just how email works)

You have to send two *whole* emails.

Please post your email code, we can then tell you what you need to do/change to make it work.

Thanks.

i got it
string userInfo = string.Empty;
string da = Convert.ToString(DateTime.Now.Date + DateTime.Now.TimeOfDay);

userInfo = "Hi,<br>You can Review your Design through this link\n" + "<br>";
userInfo += "desigurl";
userInfo += "<br>";
userInfo += "hi this testing for designer"+ da;

userInfo += "<br>" +
"<br>" + "\n" +
"<br>" + "Regards,\n" + "<br>" +
"VRL,\n" + "<br>" +
"vijanand@vrl.com";
MailMessage msg = new MailMessage();
msg.From = new MailAddress("times", "times");
msg.To.Add(new MailAddress("arjunsingh@vrl.com"));
msg.Subject = "Review your work";
msg.Body = userInfo;
msg.IsBodyHtml = true;
msg.Priority = MailPriority.High;
SmtpClient c = new SmtpClient("mail.vrl.com");
c.Send(msg);
userInfo = "Hi,<br>Congralutions ,your work has been allocated\n" + "<br>";
userInfo += "rahil is a Cheater";
userInfo += "<br>";
userInfo += "hi this testing for approver" + da;

userInfo += "<br>" +
"<br>" + "\n" +
"<br>" + "Regards,\n" + "<br>" +
"vrl MANAGER,\n" + "<br>" +
"vrl@indiane.com";

MailMessage msg1 = new MailMessage();
msg1.From = new MailAddress("BZDM@FastDezine.com", "FastDezine");
msg1.To.Add(new MailAddress("prashanth@zapak.com"));
msg1.Subject = "Congralutions ,your work has been approved";
msg1.Body = "rahil is a Cheaterhi this testing for designer";
msg1.IsBodyHtml = true;
msg1.Priority = MailPriority.High;
SmtpClient c1 = new SmtpClient("mail.vrl.com");
c1.Send(msg1);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.