SharePoint, Office 365, Azure, and Front end JS geek. – Chicago IL
SharePoint, Office 365, Azure, and Front end JS geek. – Chicago IL

How To: FREE internal SharePoint email (IMAP/POP/SMTP) inbound and outbound

If you haven’t seen please go download a copy .  To fully demo SharePoint inbound and outbound email features on a local virtual machine I needed something simple.   Without any network dependency, I am able to send and receive emails between SharePoint and users.  Below are the steps I followed to create my single server SharePoint 2010 DEV environment.  I haven’t seen any other blog post on this important topic so hope someone finds this helpful.

Here is the final topology:

  1. Install SharePoint (2010 or 2007, works great on both)   I recommend Brian’s script with Todd’s CU patch slipstream for a reliable build.  I run the Dec 2010 CU patch level.
  2. Install SMTP from Windows Server Manager   (details here)   Configure on TCP port 26 with FQDN as the host header (i.e.  “”)
    • image
    • image
    • image
  3. Install and configure hMailServer.   This is most of the work and screenshots below show the various options I changed.
    • Configure with MSSQL storage and point to the SQL instance SharePoint uses during first install.  Don’t slow the machine with an extra SQL express instance.
    • Disable POP3.   Invented for dial-in, we can do better with IMAP.
    • image
    • Create user accounts.  I have here.   I did not use Windows Authentication, but just typed in the password manually.   I realize this creates a duplicate password record to update, but it seemed more reliable during IMAP connections.  I had trouble using Windows only.  This more direct (non-Windows) authentication will login with the full email address as the user name ( and has no dependency on any Active Directory user object.
    • image
    • Disable AutoBan.   During failed logins this could lock the user account, excessive for DEV.
    • image
    • Set “” on the TCP listener for IMAP (143) and SMTP (25).    We reserved port 26 for the IIS SMTP that hits a drop folder for SharePoint’s timer job.   Here we will use the standard port because SharePoint Central Admin’s outbound email settings page only uses port 25 and only support a hostname configuration.
    • image
    • Enable mail relay.  This will allow FQDN (i.e. messages to reach the IIS SMTP drop folder and SharePoint.
    • image
    • Add MX record for both domain (i.e.  “”) and FQDN (i.e. “”).   MX records help SMTP and mail clients route correctly.
    • image
    • Run Diagnostics.   If done correctly everything shows green.
    • image
  4. Configure SharePoint email
  5. Configure mail client (Windows Live Mail)
    • Pretty easy but the trick is to get the IMAP/SMTP server name and port numbers typed correctly.   Save the password.
    • image
    • image
    • image
    • image
  6. Test scenarios 
    • Send to SharePoint library.   Configure a library to receive email, make note of the address.   Send a test message with attachments.   Wait up to 5 minutes, you should see new content in SharePoint now.
    • Receive SharePoint alert.   Subscribe to an alert.  You should see a welcome message.  Trigger the alert by uploading content.   You should see a single notification.
    • User to user.   Make a second user and send a message from that person.   You probably need to Log Out between sessions, but it proves the internal hMail user mail routing works.
  7. Enjoy and grab a cold beer!

So there you have it.   I’ve tried many techniques (2nd VM, Exchange, SMTP only) and this is the best combination I’ve found yet.  It allows fully inbound and outbound for SharePoint along with peer-to-peer email amongst users.  It also works great on SharePoint 2007.   This robust functionality allows me to demo anything SharePoint can offer with the confidence it will work flawlessly.  If you have any questions or comments please feel free to leave them below.  I always enjoy hearing from people. 

  • Great article Jeff thanks for sharing

  • myname

    great article.

    I have a query will be great if you can assist

    Well i am building a solution based on sharepoint foundation which will be hosted for various clients so lets i deploy the solution for client1 at and for client 2 at now uses some email service provider for email hosting and not microsoft exchange lets say godaddy email solution or something. now is it possible to configure the two boxes 1 for client 1 and second for client2 with outgoing and inbound email for lets say or something else ? if yes it will be great if you can explain a bit on how to achieve this

  • Alex Dean

    Jeff, works like a charm!!!! Just got this setup up and running on my SP2010 box with Outlook 2010. At first I could not receive emails from SP server, but once I added the local smtp server name to the smtp configurations in hmail it worked like a charm.

  • great post!

  • upendra

    This post is great

  • njohnston79

    I have sharepoint foundation 2010 and would like to know if hmail server can be installed on the same server as sharepoint or does it have to be a physically separate server. Thxs.

    • yes, this can run this on any Windows O/S. it would even work on a desktop.

      technically you can run all sorts of software on 1 host Windows O/S. the whole concept of multiple machine (many servers) is really only done for 3 reasons IMHO: 1) performance, 2) availability, and 3) support.

      1) performance = need multiple CPU/RAM for volume of requests. think load balanced web servers.
      2) availability = failure of one machine and we’re still online. redudancy, dual site, high availability fall here. and
      3) support. if different team of people “owns” the system make a new server and give them local admin. that way we don’t step on toes.

      Hope that helps!

  • njohnston79

    Oops, I just re-read the top of the page and see you wrote this is a single server DEV environment so I presume the answer to my question is yes, however I do have sharepoint foundation not the full blown sharepoint and it will be a production environment so would this work with foundation and it is advisable being a production environment. Our company has approx. 15 sharepoint users. Thxs.

  • ADKFurry

    Can’t seem to get beyond the Diagnostics…and seems to resolve to a real IP which I’m reluctant to use.

  • Robert van Raamsdonk

    I am configuring this on a single VM, My FDQN is c4968397007.dc07.loc.
    IP adress

    My confusion: do I need to configure 1 or 2 MX records? .

    I now have these MX records configured:

    1) (same as parent folder) Mail Exchanger (MX) [10] c4968397007.dc07.loc
    2) (same as parent folder) Mail Exchanger (MX) [10] dc07.loc

    With this setup. my Diagnostics are green on the Test Outbound Port, but on Test Local Connect, it resolves the host c4968397007.dc07.loc to IP address (not to like in your screenshot) and lists two ERRORS:

    1) ERROR: It was not possible to connect
    2) Was not able to open connection

    Am I doing something wrong?.

    • Hi Robert,

      I’m not very familiar with email protocols. Overall on 1 machine local DEV I don’t really think MX records are even used. Those have more to do with Internet email systems and knowing where to route messages for a given domain. On a single PC they might not apply.

      HMail has more tutorials at:

      which might help here. Overall I think as long as you can send from a client (Windows Live Mail / MS Outlook) then you’re OK. I would test first and as long as it goes, then all is well.

    • Robert van Raamsdonk

      UPDATE: Realized that a DNS update (and maybe other config steps) might require an IISRESET. Did that, and my Diagnostics are green!

      • Robert van Raamsdonk

        One time only…Back to originally described situation.

  • Sanka

    Hi ,

    Thanks for this nice post , and did you try this on SP 2013 Single server box ?


    • Thanks Sanka! Yes, this works great on 2013 also! It is more a function of the Windows O/S and SMTP 6 MMC than anything SharePoint specific.

  • Pingback: SQL 2014 and SSRS Integrated “Hello States.rdl” | @SPJeff()

  • Pingback: SharePoint & IMAP/POP3 | justSP()

  • Pestilence

    Great tutorial and works like a charm. I left the MX record step out but edited the windows hosts file. First tutorial that made the mailing work on my virtual machine! Thumbs up!

    • Thank you! Glad you found it helpful. I add this to all of my local SharePoint dev VMs.

  • Divya Pathok

    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.
    sharepoint 2013 online training

  • ducky8391

    how do I add mx records? do I need an external domain host? I’m completely confused by the “Add MX record for both domain (i.e. “”) and FQDN (i.e. “”). ” step

    • good question. I don’t think these are strictly required especially for a one machine DEV environment. My understanding is these are used more on the open Internet to relay mail for a given domain to the proper mailhost.

      Have you tested sending messages without any MX? Having DNS resolve and SMTP : 25 might be sufficient.

      • ducky8391

        I tried skipping the dns manager part and went straight to the diagnostic but all of my lights weren’t green.

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲