SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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

share|improve this answer
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 Mar 12 '13 at 10:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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