Hello Guys,
I am using office 365 email address and I am downloading PS script for server health. from last couple of days send mail script is not workout so I need help from forum team. like script error as
PS C:\Scripts\ServerHealth1.ps1
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.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM
[BJBPR01CA021.CHNPR01.prod.partner.outlook.cn]"
At C:\Scripts\ServerHealth1.ps1:61 char:1
+ $smtp.Send($message)
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo
: NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : SmtpException
guide me for the above script message so I can get mail from O365.
thanks