Forum Discussion
Khan Mansoor KHAN
May 01, 2018Copper Contributor
Domain Controller Monitoring with PowerShell using 0365 SMTP rely
Dear Techies, I am trying to monitor my domain controllers using below powershell script. However, I am unable to associate 0365 SMTP rely server in the script. Since I am not very good at power...
Mitch King
May 01, 2018Iron Contributor
You need to authenticate to use the Office 365 service as a relay
$SMTP.Credentials = New-Object System.Net.NetworkCredential("username", "password");
Mitch King
May 01, 2018Iron Contributor
https://stackoverflow.com/questions/12460950/how-to-pass-credentials-to-the-send-mailmessage-command-for-sending-emails