Using hMailServer for SharePoint Development

Exchange isn't the easiest thing in the world to set up, especially if you just want to set up user alerts and let lists receive incoming emails. hMailServer is a good substitute for your development server. Here's a pretty good guide for setting it up in your development environment. I recently set it up in my new SharePoint 2013 environment, and having done it three or four other times, I went quickly and forgot a couple of things about the process.

When I sent in emails to an email enabled document library, hMailServer returned the following error:


Your message did not reach some or all of the intended recipients.

Subject: test
Sent: 8/14/2013 8:27 PM
The following recipient(s) cannot be reached:
'somelist@thisdevserver.loc' on 8/14/2013 8:27 PM

Server error: '550 Mail server configuration error. Too many recursive forwards.'

What I forgot:  

Any time a list is set up for incoming email, the configuration in hMailServer has to be set up with the address as well.  Normally, when a list is configured for incoming email, SharePoint will set up Exchange to know about the address and how to deliver the message. If you're not using Exchange, SharePoint doesn't know how to set up the address. So you have to do it yourself.

Note that the guide linked above mentions that the catch-all address should make it so you don't have to do this. But I still do in my environment. If you happen to know why, leave a comment below so I can fix it. 

Go into hMailServer Administrator, and go to Domains -> <your domain> -> Accounts. Add an account with the address you use in the SharePoint list's incoming email address settings page, give it a password, and that's it. I don't know if any of the other options would cause it to fail, but feel free to experiment on your own to find out.