This project is read-only.
A console application that will pull mail from a POP3 mail server and dump it into a local directory. You can configure SharePoint's incoming mail settings to pick up mail from this directory. Errors and Information are logged to SharePoint's ULS.
SPMail 1.0

1. Create a folder where you want your email to get processed, such as C:\SPMail
2. In Central Admin; operations>incoming email settings, set your implementation to retrieve mail from a drop folder and enter the folder path you used in step 1.
3. Put the spmail utility on your machine and set up its configuration file. Any POP3 enabled email server will work, but this example uses branded Gmail (part of Google apps)
<!-- Pop Client Settings-->
<add key="popHost" value=""/>
<add key="popPort" value="995"/>
<add key="useSSL" value="true"/>
<add key="popUser" value=""/>
<add key="popPassword" value="password"/>
<add key="traceToConsole" value="true"/>
<add key="deleteAfterRetrieve" value="true"/>

<!-- Drop Box Settings-->
<add key="dropFolderPath" value="c:\spIncomingMail"/>
4. Set up a timer job to run spmail.exe on a regular basis, like every 5 minutes.

Setup Notes
  • You’ll need to get your mail into your pop account. You can do that with groups, aliases, or a catch all account.
  • SharePoint ignores everything after the @ when processing incoming mail, so you may be able to use that to your advantage if you’re in a hosted environment. i.e. I can forward to and everything should work fine.
  • I’ve successfully used this to pull email from GMAIL, however this application should work for any POP3 server.
  • A Note on Gmail: Gmail ignores the deleteAfterRetrieve commands. You’ll need to configure this in your POP setup within your Gmail account.

The Net project used in this solution was originally from
The MyLocalBroadband.Logging.dll is a ULS logging solution that I’ve written and it is available at

Ryan L. Miller is a SharePoint Developer/Architect in Columbus, Ohio.


Last edited Apr 21, 2009 at 8:48 PM by RyanLMiller, version 7