Configuring IIS SMTP Relay with Office 365 Account

19 September 2017 Written by

For my developer machines, I need a smtp server to test logging, monitoring and notification for the inSyca Suite.

Here I show you the steps to install and configure the IIS SMTP Server with an Office 356 account. I like this approach because I do not have to configure the credentials for the account in a ".config" file. In the local configuration files I can setup everything with the SMTP part pointing to the localhost.


  • Windows Server 2016 (will work with other Server versions, too)
  • SMTP Server Feature installed


Check for installed "SMTP Server" Feature

Open IIS 6.0 Manager

Right click on "SMTP Virtual Server #1" and select "Properties"

In "Access" modify "Connection" and "Relay"

Choose "Only the list below" and enter "" in the list of computers. If you want to use this SMTP Server for other computers in your network, add them too

Same in Relay Restrictions

Remove the limits

Here we have to modify "Outbound Security", "Outbound connections" and "Advanced"

Choose "Basic authentication", "TLS encryption" and enter an Office365 account dedicated for routing the messages.

Uncheck the limits and set "TCP port" to 587

Set a domainname and enter "" for the "Smart host"

Press OK to finish the configuration

Right click the "SMTP…" node and start the server


If you want to automatically start the SMTP Server after a reboot, don't forget to activate automatic starting of the service

Here is a sample from a .config file configuring log4net to use the local smtp server. In the comment you can see the values needed if you directly configure the Office365 account.

Iwe Kardum

Iwe Kardum

Munich – Germany

As BizTalk Consultant I'm also available for training, assessments or implementing any BizTalk project.

Call or send me an email if you have any questions.
+49 (89) 2154 6094


inSyca would like to offer you the best possible service. We use so-called cookies to ensure that you are able to make optimum use of the website. By continuing to use this website, you agree to the use of cookies
More information Accept Decline