<configuration> <system.web> <compilation debug="false" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> </system.web> <appSettings> <add key="SendMail" value="true"/> </appSettings> </configuration>
protected void Button1_Click(object sender, EventArgs e) { MailMessage mail = new MailMessage("xxxxxxxx@gmail.com", "xxxxxxxx@gmail.com"); mail.Subject = "Mail Message"; mail.Body = TextBox1.Text; SmtpClient sc = new SmtpClient("smtp.gmail.com", 587); sc.Credentials = new System.Net.NetworkCredential() { UserName = "xxxxxxxx@gmail.com", Password = "********" }; sc.EnableSsl = true; sc.Send(mail);// My browser shows above error at this point. }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)