Mar 13 2024 12:41 AM
Hi,
I am trying to use PowerShell script to send automatic emails to the users using Gmail. however, when I am running the script, encountering the following error message
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. For more information, go to
Below is the script I am using.
Send-Mailmessage -smtpServer $smtpServer -Port 587 -UseSsl -from $from -to $emailaddress -subject $subject -body $body -bodyasHTML -priority High -Encoding $textEncoding -Credential $credential -ErrorAction Stop
Any help will be highly appreciated.
Thank you.
Mar 13 2024 04:22 PM
Mar 13 2024 08:42 PM
Mar 13 2024 08:58 PM
Mar 14 2024 09:47 AM