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;
}
}
}
|