Last active
June 21, 2018 23:41
-
-
Save h2ospace/7138758a776af751d1545c2647c24db8 to your computer and use it in GitHub Desktop.
Send Email from Gmail by C#(.NET Core)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient('smtp.gmail.com', 587); | |
smtp.EnableSsl = true; | |
smtp.Credentials = new System.Net.NetworkCredential("***id***", "***password***"); | |
System.Net.Mail.MailMessage oMsg = new System.Net.Mail.MailMessage("from", "to", "subject", "body"); | |
smtp.Send(oMsg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment