Wednesday, 6 January 2016

The SMTP server requires a secure connection or the client was not authenticated in powershell.

Exception calling "Send" with "1" argument(s): "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Require
d. Learn more at"
At C:\Users\asishm\Desktop\JDRPowershell_Scripts\Mail.ps1:12 char:11
+ $smtp.Send <<<< ($SMTPMessage)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException


Solution:

Go to the below site url to enable the "Access for less secure apps".

https://www.google.com/settings/security/lesssecureapps


It will work 100%.

No comments:

Post a Comment