Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
Assuming your users can type, all you have to do is execute the line:toAddress = new MailAddress(myTextbox.Text);before you create the new MailMessage.[edit]Typo - forgot to change fixed string to use textbox content.[/edit]
var smtp = new System.Net.Mail.SmtpClient(); { smtp.Host = "smtp.gmail.com"; smtp.Port = 587; smtp.EnableSsl = true; smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network; smtp.Credentials = new NetworkCredential(fromAddress,...
24 Dec 2012Riasat Azim Dip
public void Messegesend(string email,string firstname,string lastname,string messege) { try { string messegebody = "Dear Admin " + "\n" + messege + "\n Thanks \n " + firstname + " " + lastname + " \n" + email; ...
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.