SyntaxFix
Write A Post
Hire A Developer
Questions
Step (1): smtp.EnableSsl = true;
smtp.EnableSsl = true;
if not enough:
Step (2): "Access for less secure apps" must be enabled for the Gmail account used by the NetworkCredential using google's settings page:
NetworkCredential