Skip to main content
Test the Office365 SMTP Relay Service from PowerShell
- To open PowerShell right-click the start button and Choose Windows PowerShell.

- Enter the following command
- $msolcred = get-credential
- A window pops up. Enter your office365 credentials there.

- Then use the Send-MailMessage command to send a test email
- Send-MailMessage –From georgia.k@c***i.gr –To georgia.k@c***i.gr –Subject “Guess what!” –Body “I am Testing the SMTP Relay Service from PowerShell” -SmtpServer smtp.office365.com -Credential $msolcred -UseSsl -Port 587

- If there is no error, check your inbox for a new email!
Comments
0 comments
Please sign in to leave a comment.