The Problem

On some Windows Server machines that are virtual machines hosted in a VMWare environment, SharePoint will not be able to send emails or alerts. The symptoms of the problem described in this article are:

  1. When you subscribe yourself or a user to an alert and press 'OK', the alert subscription page hangs (subnew.aspx)
  2. When you add new users to a SharePoint group and choose to send an email to the new users, the page also hangs (aclinv.aspx)

In other words, whenever SharePoint attempts to send an email using SMTP, it will just hang forever. You will not see any error messages in the logs or any SMTP traffic in the network traces.

 The Cause

All windows based operating systems have a protocol stack. The protocol on the top of the stack is the default protocol. By default, all windows installations have "TCP" as the default protocol. For some reason, on some VMWare systems, it has been observed that the default protocol changes from TCP to UDP. When SharePoint needs to send an outgoing email, it has to be over a TCP port 25. To open this port, SharePoint asks the operating system to open port 25, using the default protocol. Too bad that SharePoint (like many other applications) relies on default settings of the OS. The operating system does not "listen" on UDP port 25, it only "listens" on TCP port 25, and because of this, if the default protocol is not TCP , SharePoint just waits and waits and waits for the operating system to respond to it's request which never happens.

 The Solution

The solution to the problem is fairly simple. Thanks to the Windows SDK, that has a tool (SPOrder.exe) that allows us to change the protocol stack on any system. If you are experiencing the symptoms explained here, here is what you will need to do:

  1. Download and install the latest Windows SDK (http://www.microsoft.com/downloads/details.aspx?FamilyID=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en)
  2. Navigate to C:\Program Files\Microsoft SDKs\Windows\<<version>>\Bin
  3. Double click on SpOrder.exe
  4. You should see that UDP is on the top of the list, as shown below:
  5. SpOrder
  6. This is incorrect. TCP/IP should be on the top and UDP/IP should be the second item on the list.
  7. Select TCP/IP and click on 'Up'. You will see a warning message, click OK
  8. Click on 'Apply' and 'OK' to save your changes.

Once you make these changes, SharePoint should now be able to send emails normally.