using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Net.Mail; using System.Net.Mime; public partial class _Default : System.Web.UI.Page { MailMessage mail = new MailMessage(); private void clear() { TextBox2.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; } protected void Button2_Click(object sender, EventArgs e) { { { MailMessage message = new MailMessage(); message.From = new MailAddress("nch@gmail.com"); message.To.Add(new MailAddress("nch@gmail.com")); message.Subject = "test"; message.Body = "This is test"; SmtpClient msg = new SmtpClient("relay-hosting.secureserver.net"); msg.Credentials = new System.Net.NetworkCredential("francis@protonbpo.com", "***********"); msg.Port = 25; msg.EnableSsl = false; msg.Send(message); } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)