1. To open PowerShell right-click the start button and Choose Windows PowerShell.

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

  4. Then use the Send-MailMessage command to send a test email
    1. 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