Created
September 30, 2018 17:20
-
-
Save abfo/dcc02f55fc79e374fe82e8744f11ceb8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| using (SmtpClient smtp = new SmtpClient()) | |
| { | |
| smtp.DeliveryMethod = SmtpDeliveryMethod.Network; | |
| smtp.UseDefaultCredentials = false; | |
| smtp.EnableSsl = true; | |
| smtp.Host = "smtp.gmail.com"; | |
| smtp.Port = 587; | |
| smtp.Credentials = new NetworkCredential("email@gmail.com", "password"); | |
| // send the email | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment