Hello,
I want to send Email from my web site
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Munesh SharmaRank #174 · 13.9K reputationPosted Feb 1, 2015, 11:21 PM EST
Vinodh NarayananRank #175 · 13.8K reputationPosted Feb 2, 2015, 12:23 AM EST
MailMessage Msg = new MailMessage();
Msg.To.Add(TextBox1.Text);
Msg.From = new MailAddress("[email protected]");
Msg.Subject = "Forgot Password Information";
Msg.Body = "Username: " + ds.Tables[0].Rows[0]["UserName"] + "Password: " + ds.Tables[0].Rows[0]["Password"] + "";
Msg.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.Credentials = new System.Net.NetworkCredential("your email id ", "your password");
smtp.EnableSsl = true;
smtp.Send(Msg);
Please mark if accepted answer
DarinRank #4,382 · 347 reputationPosted Sep 1, 2015, 4:03 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 1, 2015, 8:47 AM EDT