View Single Post
  #1 (permalink)  
Old October 21st, 2011, 06:42 AM
asp.net123 asp.net123 is offline
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default What should be the programming so that email get delivered in two emil ids ?

Hi,
I am learning asp.net using your book.
I have created the the feedback form just like mentioned in the book. But I would like to add one feature in it so that when user fill the form and click on submit button the data of form get delivered in two emil ids. I tried by putting commas between two email ids but it do not works. please help me.


MailMessage myMessage = new MailMessage();
myMessage.Subject = "Response from web site";
myMessage.Body = mailBody;

myMessage.From = new MailAddress("santosh@yahoo.com", "Santosh Kumar");
myMessage.To.Add(new MailAddress("options@gmail.com,second_email@yahoo. com", "Santosh Kumar"));

SmtpClient mySmtpClient = new SmtpClient();
mySmtpClient.Send(myMessage);

lblMessage.Visible = true;
FormTable.Visible = false;
}
}
}