Code for send mail in asp net using c# through asp.net fromRDr d11yAsked Dec 9, 2015, 12:52 AM EST4 answersShareLinkedInXCopy linkSavecode for send mail in asp net using c# through asp.net from local host
Code for send mail in asp net using c# through asp.net fromRDr d11yAsked Dec 9, 2015, 12:52 AM EST4 answersShareLinkedInXCopy linkSavecode for send mail in asp net using c# through asp.net from local host
RDr d3 reputation11y agoPosted Dec 9, 2015, 12:53 AM EST0code for send mail in asp net using c# through asp.net from local host0
Rajeesh MenothRank #118 · 18.4K reputation11y agoPosted Dec 9, 2015, 12:55 AM EST0Hi, Refer My article related to mail sending : http://www.c-sharpcorner.com/UploadFile/2a6dc5/how-to-send-a-email-using-Asp-Net-C-Sharp/ Other Reference : https://www.daniweb.com/programming/software-development/threads/195009/send-email-from-localhost-using-c- http://www.dotnetcurry.com/ShowArticle.aspx?ID=65 The answer is helpful.Then please accept it..!! 0
Ravi PatelRank #439 · 5.7K reputation11y agoPosted Dec 9, 2015, 1:28 AM EST0Hi , you can also send an email using your gmail account protected string SendEmail( ) { string toAddress= "";// email address here string subject ="Subject here "; string body ="messssssssss here" string result = "Message Sent Successfully..!!"; string senderID = "SenderEmailID";// use sender’s email id here.. const string senderPassword = "Password"; // sender password here… try { SmtpClient smtp = new SmtpClient { Host = "smtp.gmail.com", // smtp server address here… Port = 587, EnableSsl = true, DeliveryMethod = SmtpDeliveryMethod.Network, Credentials = new System.Net.NetworkCredential(senderID, senderPassword), Timeout = 30000, }; MailMessage message = new MailMessage(senderID, toAddress, subject, body); smtp.Send(message); } catch (Exception ex) { result = "Error sending email.!!!"; } return result; }0Ranjit PowarRank #553 · 4.4K reputation11y agoPosted Dec 9, 2015, 1:33 AM EST0check this http://www.c-sharpcorner.com/code/1187/how-to-send-mail-using-smtp-client-in-C-Sharp.aspx 0Join to answer this questionEvery answer you publish earns 20 SHARP.Create free accountSign inKnow the answer?Answer a question in the forums and earn +20 SHARP for every answer.See unanswered questionsForumsTop experts01Arun PottiAnswers in the forums20answers02Tahir AnsariAnswers in the forums5answers03Kamlesh KumarAnswers in the forums5answers04Sam HobbsAnswers in the forums4answers05Željko PerićAnswers in the forums3answers?YouYour name goes here.Every answer: 20 SHARP.JoinFull leaderboard →2026DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Ranjit PowarRank #553 · 4.4K reputation11y agoPosted Dec 9, 2015, 1:33 AM EST0check this http://www.c-sharpcorner.com/code/1187/how-to-send-mail-using-smtp-client-in-C-Sharp.aspx 0
r d3 reputationPosted Dec 9, 2015, 12:53 AM EST
Rajeesh MenothRank #118 · 18.4K reputationPosted Dec 9, 2015, 12:55 AM EST
Ravi PatelRank #439 · 5.7K reputationPosted Dec 9, 2015, 1:28 AM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Dec 9, 2015, 1:33 AM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts