Configure Windows Server 2012 SMTP Relay
Go in Server Manager to Tools > Internet Information Services (IIS) 6.0 Manager > Right-click [SMTP Virtual Server #1] > Click ”Properties” .
Click ”Access” tab > Click Connection > Check ”All except the list below” > OK > Click Relay > Check ”All except the list below” > OK.
Click ”Delivery” tab > Click ”Outbound Security” > Check ”Basic Authentication” > Type username and password of Office 365 user > Click ”TLS encryption” > OK >
Click ”Outbound connections” > Change ”TCP port” to 587 > OK > Click ”Advanced” > Fill in ”Smart host” with the name of the Office 365 SMTP server > OK > OK.
Check firewall rules – ”Simple Mail Transfer Protocoll (SMTP-In)”
Warning! You have an open relay now. Use this setup to check the email notification system. When you see it´s fully functional go back to the ”Access” tab and narrow down the ”Connection” and ”Relay” settings to the necessary systems. When no other system needs to relay, just check ”Only the list below” and grant ”127.0.0.1ÔÇ│ access.

