Overview

This article will guide you through installing and setting up an SMTP server on a Windows Server. This allows your Windows based server to send email directly and commonly used when local applications need to send email notifications.

Enabling SMTP Feature

  1. Connect to your server via Remote Desktop
    Install and Configure a local SMTP server on a Windows server
  2. Open Server manager:
    Install and Configure a local SMTP server on a Windows server
  3. Click Manage then Click Add Roles and Features:
    Install and Configure a local SMTP server on a Windows server
  4. Click Server Selection:
    Install and Configure a local SMTP server on a Windows server
  5. Click Features:
    Install and Configure a local SMTP server on a Windows server
  6. Scroll until you find SMTP Server.
  7. Tick the box to the left of SMTP server:
    Install and Configure a local SMTP server on a Windows server
    A popup will appear advising on addition features required.
  8. Click Add Features:
    Install and Configure a local SMTP server on a Windows server
  9. Click Next, then click Install.
  10. Wait for the SMTP feature to complete installation then click Close:
    Install and Configure a local SMTP server on a Windows server

Configuring the SMTP server

We now need to configure the SMTP server to only allow emails from the local server, this will help prevent spammers using your SMTP server to send spam.

  1. Open the IIS 6 application
    Install and Configure a local SMTP server on a Windows server
  2. Expand the server name so the SMTP server is visible:
    Install and Configure a local SMTP server on a Windows server
  3. Right click on the SMTP server and select Properties:
    Install and Configure a local SMTP server on a Windows server
  4. Tick Enable Logging:
    Install and Configure a local SMTP server on a Windows server
  5. Next under the Access tab Open Authentication:
    Install and Configure a local SMTP server on a Windows server
  6. Ensure Anonymous Access is enabled:
    Install and Configure a local SMTP server on a Windows server
  7. Still under the Access Tab select Connection:
    Install and Configure a local SMTP server on a Windows server
  8. In the popup select Only the list below and Click Add:
    Install and Configure a local SMTP server on a Windows server
  9. Under Single Computer enter the IP Address 127.0.0.1 and click OK:
    Install and Configure a local SMTP server on a Windows server
  10. Click OK again to close the connection window:
    Install and Configure a local SMTP server on a Windows server
  11. Next click Relay:
    Install and Configure a local SMTP server on a Windows server
  12. Once again select Only the list below and click Add:
    Install and Configure a local SMTP server on a Windows server
  13. Under Single Computer enter the IP Address 127.0.0.1 and click OK:Install and Configure a local SMTP server on a Windows server
  14. Click Apply to save your changes:
    Install and Configure a local SMTP server on a Windows server
  15. Under the Delivery tab select Outbound Connections:
    Install and Configure a local SMTP server on a Windows server
  16. Set Limit number of connections and Limit number of connections per domain to 25. TCP port should remain as 25:
    Install and Configure a local SMTP server on a Windows server
  17. Click OK.
  18. Click Apply to save your changes again:
    Install and Configure a local SMTP server on a Windows server
  19. Under the delivery tab click Advanced:
    Install and Configure a local SMTP server on a Windows server
  20. Set the Fully-Qualified domain name to the hostname of your server. EG: server.yourdomainname.help
    Install and Configure a local SMTP server on a Windows server
  21. Click OK.
  22. Click OK again to close the setup window.

Confirming your configuration is working

We now need to confirm the configuration is working

  1. Open a PowerShell Window on the server.
  2. Enter the below PowerShell code, replacing “” with an email address associated with the domain you wish to send from.
Send-MailMessage -SMTPServer localhost -To  -From  -Subject "This is a test email" -Body "Hi, this is a test email sent from your Windows Server"
  1. Press Enter.
  2. Check the mailbox you have used in the above code example, the email should arrive if not blocked by any spam filtering services and configuration is correct.

Information

We recommend updating your SPF record for the sending domain to prevent your email being marked as potential spam.

This can be done by adding an ip4:<your server ip here> into the SFP TXT record at your DNS host

Was this article helpful?

Related Articles