Chapter 10 Challenge; Workflows sending Email

1. Introduction

The diligent student arriving at Page 302 (Sahil Malik; Building Solutions for SharePoint 2010) is confronted with a very innocently sounding sentence stating “Once the workflow has finished, and assuming that you have your SMTP server configured, you should receive an e-mail with the necessary reminder“. The only problem appears to be the simple fact, that following the Author’s instructions, no such configuration was announced hence fore you could turn the page and ignore or take actions and additionally setup your development machine in order to be able sending and receiving emails.

I was rather trying to fix the SMTP issue in order to have a machine with emailing capability. First of all however let me summarize the options in this regard. My list could be incomplete and perhaps there are even more possibilities recently I’m recently not aware of.

2. Microsoft’s IW Demo Image

Perhaps the best option to play around with e-mailing within SharePoint 2010 is to use the professionally setup Hyper-V Image provided by Microsoft. You could download two machines, one is a DC ( with Visual Studio 2010, Office Professional Plus 2010 and more installed. The second machines is a domain joined server with Exchange Server 2010 running, thus the environment seems to be perfect for 180 days of evaluation:

2010 Information Worker Demonstration and Evaluation Virtual Machine (RTM)

Let’s see what else we could do in order to preserve the book’s original machine. What we would like to have is a running SMTP Server and a POP3 Service. The first one should be not a problem as Windows Server 2008 R2 supports this feature. The problem seems to be that POP3 has been depreciated and will no longer be supplied as part of the Windows OS. Although POP3 was introduced with Windows Server 2003, Microsoft removed it after including it in just one generation of the OS.

3. Smtp4dev

One very simply looking solution could be according Rob Wilson’s suggestion, to only setup SMTP and instead of any POP3 Service installed, use simply an SMTP traffic sniffle (named smtp4dev), which captures sent emails without actually sending them. Thus you will be able to monitor whether e-mails have been sent. This is perhaps for demo purposes only as the solution does not allow you to maintain POP3 mailboxes on the machine.

4. HMailServer POP3

Furthermore I have discovered a setup posted by Lavinia (SharePoint 2010 Incoming/Outgoing Email Settings for Dev Environment), who suggests to use a third party POP3 Service named HMailServer. I have never tried this way and thus cannot tell anything more. Unfortunately the article does not clearly define, whether the Windows OS provided SMTP Server has to be turned on/off or/and HMailServer provides out-of-the-box it’s own SMTP Server. 

5. MailEnable POP3

Another article suggests using MailEnable Standard Edition (free) as POP3 Service. This was a nice looking alternative. I was optimistic and started evaluating this solution. The mailboxes were working fine, however it was problem setting up in SP2010 Central Administration incoming and outgoing email configuration. I was facing a warning, that SMTP Server is needed for doing so. MailEnable however provides it’s own SMTP infrastructure so I was rather puzzled. I was therefore trying to configure the out-of-the-box available OS Level SMTP Server, which however couldn’t be started. Assuming there is a conflict between those SMTP Services, I just promptly stopped with the evaluation concluding as rather dead end.

6. Visendo SMTP Extender

Lastly I figured this promising SMTP/POP3 configuration (Installing and configuring SMTP and POP3 e-mail for sharepoint 2010) based on the Visendo POP3 Extender for Windows 2008 Server. Please note while trying to download from the provider’s web site, select the “Visendo SMTP Extender” from the list, which is free.  It is important to note, that better you follow exactly the steps provided in the article. My first attempt’s failure was overlooking one particular SMTP Configuration step, whereas it is suggested to create an Alias entry  (Picture 1).

Picture 1

At the end of the day I could confirm, this solution worked for me, however by far not as reliable as expected (see more at the end of this article). The Site-List Workflow based on the book’s Chapter 10 sends the confirmation E-Mail (Picture 2) correctly.


Picture 2

7. Configure Administrator’s Profile

The configuration jungle however does not end succeeding to configure SMTP/POP3 on your development machine. Instead of sending and receiving emails you could see a rather alarming SharePoint 2010 message stating “You do not have an e-mail address” (Picture 3). Based on my poking arounds, here below I will provide you the checkpoints which helped me to resolve this issue.

Picture 3

The problem seems to be specific for developers following the book author’s examples. You are probably signed on as your domain’s administrator however without explicitly configured user profile. Hence for go to Central Administration >> Application Management >> Manage Service Applications and look for “User Profile Service Application” (Picture 4). Proceeding with “Manage User Profiles” type administrator into the Find profiles dialog input and click the Find button (Picture 5).


Picture 4


Picture 5

The administrator’s freshly find profile should appear. Click on “Edit My Profile” (Picture 5) and scroll down to “Work e-mail ” field which is presumably empty for your administrator’s account. Type-in now the correct e-mail and proceed with the form’s “Save and Close”.

Next this newly provided information has to be synchronized with SharePoint as well. Go for this reason to Central Administration >> Monitoring >> Review Job definitions and look for the “User profile Service Application – User profile SharePoint Full Synchronization” job (Picture 6), which is by default scheduled to run hourly. Select that job and click on the “Run Now” button. image

Picture 6

Check whether the changes will apply. Open-up your Workflow list now in SharePoint and in the upper right corner check both “My Profile” and “My Settings” (Picture 7). The provided e-mail address has to there in both cases. If that is not the case, something went terribly wrong and before proceeding start analyzing and resolving.  Otherwise well done, you will be able getting e-mail notifications while that mentioned above Site-Workflow completes.


Picture 7

One more thing has to be noted . Emails are sent from SharePoint 2010 not immediately, even you ask to do so. There are dedicated SharePoint Jobs for each WebApplication (Picture 8) named “Immediate Alerts” scheduled to run by default every 5 minutes or so. You could run these jobs immediately from Central Administration >> Monitoring >> Review Job definitions. 


Picture 8 (Alerts dedicated to Web Applications listening on ports 80 and 801)

8. SMTP/POP3 Extender problems

The annoying problem with this recently configured solution is (tested on two separate virtual images) that e-mail routing works not reliable. What I have seen is that e-mails are created and sent each time as expected. The messages are dropped into the pre-configured folder at  “c:\intetpub\mailroot\drop” (Picture 9) however the POP3 Extender looks like is not each time willing to pickup these emails. Sometimes the messages are forwarded into the target folders, sometimes not. Not forwarded/processed messages will disappear after a few seconds without ever arriving at any destination. The behavior is a real curiosity, as clicking with the mouse on the .eml file in the “…\mailroot\drop” folder will trigger the correct delivery. So in order to make sure the emails are sent, monitor in windows explorer the drop-folder and if any email arrives there, quickly click it (kick it) and the delivery succeeds. Very strange indeed! If anyone is aware of some remedy, would be more then delighted to hear some good news in this regards.


Picture 9

This entry was posted in SharePoint 2010. Bookmark the permalink.

2 Responses to Chapter 10 Challenge; Workflows sending Email

  1. Clayton Cobb says:

    FWIW, I am still using MailEnable since writing that article last year while SP2010 in Beta. It works very, very well for outgoing email, but I have never tried to set up incoming email in case that was what you were struggling with. For outgoing, it’s a breeze.

    • Stefan R. says:

      Wow Clayton, thanks for your comments. Yes it was incoming mail configuration with warning popping up about missing SMTP Services. In your artcile “Fig 7- W2K8R2 Features” SMTP Server looks like is turned on. Ever have tryed to start SMTP Service with running MailEnable?

      Regards, Stefan

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s