Wednesday 5 September 2012

SharePoint Email Tester (SPUtility.sendmail)

Formatting email using SPUtility.SendMail is a bit of a nightmare, most development VM's do not have exchange installed on them so I have written a little console application that you can run in an integration environment or production environment (not recommended) and test your email formatting.   You could also use this for testing email to exchange integration is working it is a lot quicker than telneting to port 25 and manually constructing an email to exchange.  How it works:

  1. Unzip the files
  2. Open up the EmailContent.xml
  3. Update the to / from and body etc.
  4. Run the exe following the instructions on the screen (1 to send email and 2 to create a new xml file in case you delete it)
To put line feeds in the body of your mail message do the following in the xml file <![CDATA[<br/>]]>

You can download the exe from here and the source code from here


Let me know if you have any issues happy to help out.