Configuring an SMTP Server for SharePoint

Harnessing Simple Mail Transfer Protocol for SharePoint

Need a Mail Server for SharePoint but don’t have a spare dedicated Mail Server? No problem! You can just use your SharePoint Server for mail with some relatively simple configuration adjustments!

First, you will need to decide which server or servers will be the mail server in your Farm. This will typically be the Web Front End, but can change depending on your SharePoint topology and needs. This server will need to have the IIS 6.0 and SMTP feature installed. This will be your first step.

Next, you must configure the SMTP and SharePoint configuration. You will first need to create an Alias in SMTP. To do so, open IIS 6.0, Expand SMTP Virtual Server, right-click Domains and select New and Domain. In the New Domain Wizard, select Alias and give your SMTP Server a name. This can really be almost anything, but I personally will usually go with something like mail.servername.

New SMTP Domain Wizard

Now, we need to set some basic SMTP permissions. While IIS 6.0 is already open, we will right-click SMTP Virtual Server and select Properties.  Now select the Access tab as seen below:

SMTP Virtual Server Access Tab

Click the Connection tab and ensure that ‘All except the list below’ is selected, with no entries in the list. This is signifying that the server will accept connection attempts from any server. This may sound like a security risk, but we will be using the Relay setting to secure this now.

Now select Relay as seen in the picture above and select only the list below. In the list, make sure you include, and any IP addresses of Web Front End’s in your SharePoint Farm on the Interface that talks to the server you are currently on. Now restart SMTP and SMTP should be configured. By changing what we will allow to relay, we have effectively limited any relay services to only servers in the SharePoint Farm, meaning we have not configured the dreaded Open Relay.

Now we will open and edit the hosts file. This is so we can make the Relay rule true for the mail server. This file is located at the following location:


We will need to edit this hosts file as follows:

SMTP Edit the Host File

**Remember that mail.servername is actually the Alias you set previously. By saving this entry to the hosts file, we are making this resolve to Not only does this tell the server to send mail to itself, but it also makes the Relay rule true, which allows the server to relay off of itself. Also, if your environment will only have this mail server, but multiple Web Front Ends, you will need to edit the hosts file of each Web Front End server to use this server’s internal IP for mail.servername.

Now it’s time to configure SharePoint with the correct information. To do so, start by opening Central Administration. Click on System Settings and then Configure outgoing e-mail settings.

Configure SharePoint Outgoing Email Settings

As you can see above, you will use the mail.servername for the Outbound SMTP server.

The From address can really be whatever you want. However, be aware of your recipients and if they require PTR or RDNS (additional email security), and configure this accordingly. You typically won’t have problems if you make this address something different than that of your recipients, but otherwise this can be completely faked for the most part.

The Reply-to address should be an email address that already exists that you access frequently. However this can be faked as well if you do not want return emails.

Leave the default Character set as UTF-8.

That’s it! You have now configured Outgoing SMTP for your SharePoint Farm.

To configure Incoming as well is very similar. You will simply navigate to System Settings then Configure incoming e-mail settings in Central Administration. For Enable sites on this server to receive e-mail select Yes; for the E-mail server display address: use any domain that you have configured appropriate MX records for as you can see from below. (You will need to point an MX record for the domain you use at this server’s external IP address). All other settings can be left as default.

SMTP Email Server Display Settings

**To make multiple mail servers, you need to perform each step for each mail server.  Then ensure that the outgoing e-mail, incoming e-mail, or both timer jobs are running on each mail server, (you only need the timer jobs for the services you are actually using). Some items, such as setting MX records, PTR and/or RDNS, are DNS related and outside the scope of this posting. However quick descriptions for these records can be found online and help for configuring these records is highly individualized and assistance can usually be found from your DNS provider.

Hope this helps! Thanks for reading!

2013-10-16T08:30:57+00:00 October 16th, 2013|


  1. SPJeff October 16, 2013 at 2:28 pm - Reply

    Great post Eric. To enable both outbound and inbound email on SharePoint I’ve found hMailServer to be really helpful for IMAP demo inboxes and SMTP forwarding (inbound email). Feel free to take a look at:

  2. Eric Lough November 6, 2013 at 11:14 am - Reply

    Very Nice! Thank you for the compliments as well Jeff! I had never attempted to use hMailServer but it appears to be rather more robust than SMTP only. I wonder if the functionality could be extended by the availability of other mail protocols in hMailServer? I do like how you explain the mail client aspect as well as how to configure it. Cheers!

  3. Pram November 19, 2014 at 2:47 pm - Reply

    how to identify if the SMTP relay service is stopped, it does not log anywhere. I need to make smtp server more fault tolerant, can we configure more than one server as SMTP server

  4. Eric Lough January 30, 2015 at 10:44 am - Reply

    Hello Pram,

    Sorry for the late reply! Yes you can configure multiple SMTP server’s to provide redundancy. For outgoing email this would be to simply install SMTP on each server, and mark as the name of the outgoing email server in each server’s hosts file. For incoming, you will want the incoming email server name to be an alias on each servers’ SMTP configuration, and have your MX record for the email domain resolve to the load balanced IP address. You will also need to add the load balanced IP address to the allowed relay settings in SMTP. (You can use MX record configurations to bypass the need for a load balanced IP however).

    So you can have multiple SMTP servers for both outgoing and incoming. You just basically do everything in the article twice. For incoming, you only need to have a special consideration for a load balanced IP, (can be Windows NLB, other NLB software, or Hardware NLB), and the MX record needs to utilize this NLB IP. You can actually circumvent the need for an NLB IP by manipulating your MX records if this is a concern. I have a blog post here that describes how to manipulate MX records:

  5. sharepoint 2013 online training July 9, 2015 at 12:18 am - Reply

    Helpful data shared. I am extremely happy to read this write-up. thanks for giving us good info. Great walk-through. I appreciate this post.

  6. Mafeer January 5, 2016 at 7:38 am - Reply

    is there any other third party SMTP sevrer same like IIS SMTP Server you
    for Sharepoint ?

  7. Shirlene Spillane March 17, 2016 at 2:39 am - Reply

    my business was requiring a form some time ago and discovered an excellent service that has a lot of fillable forms . If you need to fill out it as well , here’s

  8. Latifa February 27, 2017 at 2:09 pm - Reply

    Hello Eric,

    I have mail server online 365 and I did configure the connector to connect to smtp relay sharepoint 2010.
    The mail is received by iis on wfe but it put the mail file in the bad folder instead of drop one!
    I have mail in the office 365 and I am using smtp relay for outbound emails !
    now I need to have incoming email to sharepoint 2010 and email is received by the iis sharepoint wfe but not inserted in the drop folder instead in the bad folder!

    Thank you
    Any hint or help!

  9. Latifa February 27, 2017 at 2:13 pm - Reply


    Incoming mail to sharepoint 2010, email is received by iis in the queue folder but it is replaced in the bad folder instead of the drop.
    outlook server on the 365 and I am using smtp relay to wfe sharepoint 2010. I have application server and wfe.

    Any hint !
    Thank you

Leave A Comment