I am back with my 3rd blog and this blog is primarily with testing SMTP relay with Office365 for that matter 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.
After lots of research and brainstorming I was able to get awesome reliable tool i.e. PowerShell (which is installed on most of the windows machine). I am going to share the step which I used to test customer's scenario.
How to test SMTP server using PowerShell.
This command is to drop email using SMTP server
$msolcred = get-credential | save the credential of from address
Send-MailMessage –From firstname.lastname@example.org –To email@example.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 firstname.lastname@example.org –To email@example.com –Subject “Test Email” –Body “Test SMTP Relay Service” -SmtpServer domain.mail.protection.outlook.com
I hope above steps will help many admin's to affectively troubleshoot and test SMTP relay server against Office365 or any SMTP email servers.
Awesome, thanks for this post. I used this today to test relaying with another user's credentials.
Thank you for this useful post. I used the process and found it really helpful.If you want to check more update about smtp server, do visit http://bestsmtpserver.com/