I would like to send an email from my workflow. The email must be sended as html because I have an a href tag inside of it. See code below with my current code:

string ClientEmailBody = string.Format("Er is een nieuw wijzigingsverzoek voor beoordeling <a href='{0}'>{1}</a>", someUrl, someTitle);

    bool sendMail = SPUtility.SendEmail(workflowProperties.Web,true,true,ClientEmail,ClientEmailSubject,ClientEmailBody);

Sometimes the a href is OK. But sometimes it is not working. If the url is not working I got the following url:


I dont use special urls, but normal. See here an example of the url:


Do I need to explicit send the mail as html?

1 Answer 1


A few items for thought.

  1. Try performing a URLEncode on your HREF within your string, just to make sure none of the ampersands and such are viewed as problematic characters
  2. Try replacing the single quotes with double quotes for your href attribute value
  3. Have you tried sending the emails to other email account types (yahoo, gmail, etc)? Even if this is only meant to be sent to internal staff, it would be good to verify that it's not an issue with how you're composing the emails themselves, but perhaps a security limitation of your email provider. If it's only your internal email that's causing a problem, hopefully it's just some settings you have to tweak on your mail server.

Hope this helps, good luck

  • I try above, but it dont work. I think it is an echange problem because when I change the hostname ot my live website hostname it works. With the hostname of my test environment it is not workin.
    – Ola
    Commented Mar 12, 2013 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.