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 have a workflow in visual studio and I need to send an email to a domain user whose name is entered into a sharepoint Person or Group lookup. The value will not be in a sharepoint group, it is from an AD sync:

workflowProperties.Item["Project Manager"].ToString();

When I test it using smtp4dev in our dev environment, the email address is coming up strange so I am not sure if it will be sent in the production environment:

7 <7>; #Johnson <#Johnson>; Tim <Tim>

Do I have to do anything to extract the email address from the lookup column?

MOSS 2007
VS 2010

share|improve this question
up vote 1 down vote accepted

User Lookup column does not contain data about SPUser properties such as email, it contains user Id and Title only.

The string representation of user lookup column value will be "1;#John Doe", where ";#" is a delimeter.

From the code point of view, User lookup value is an SPFieldUserValue object. You can get user email as a property of SPUser object, but first you should retrieve it from current field value.

You can do it using the code,described in this article:

share|improve this answer
That did it! I needed this completed by the end of the day today and I have been looking for a solution for the past two days. Thanks! – steveareeno Nov 30 '12 at 16:02

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.