Post date: Apr 07, 2016 11:20:2 AM
Testing SMTP relay with Office365 (this testing can be used against any email applications which does SMTP relay.)
I would primarily concentrate with Office365 SMTP relay. There have been scenario with me while troubleshooting SMTP relay I really wanted some reliable tool to troubleshoot issue from customer machine or network.
Telnet works awesome if your SMTP server is Office365 MX record.
If you use Office365 SMTP server i.e. smtp.office365.com on telnet it does not work because authentication is mandatory and for some reason I was not able to make authentication work in Telnet
How to test SMTP server using PowerShell.
This command is to drop email using SMTP server
$msolcred = get-credential
Send-MailMessage –From user@domain.com –To user@hotmail.com –Subject “Test Email” –Body “Test SMTP Relay Service” -SmtpServer smtp.office365.com -Credential $msolcred -UseSsl -Port 587
This command is to drop email using MX records
Send-MailMessage –From user@domain.com –To user@hotmail.com –Subject “Test Email” –Body “Test SMTP Relay Service” -SmtpServer domain.mail.protection.outlook.com