Send Email Extended Issue

May 11, 2009 at 6:06 PM

When I put in "CreatedBy" in the Workflow in the "Display as sender" variable, I get the following WF Exception. How do I convert the column so it successfully sends the email? If I show the variable, it is formatted as DOMAIN\Username rather than e.g.

System.FormatException: The specified string is not in the form required for an e-mail address.
   at System.Net.Mime.MailBnfHelper.ReadMailAddress(String data, Int32& offset, String& displayName)
   at System.Net.Mail.MailAddress.ParseValue(String addr


May 12, 2009 at 6:13 PM

I use Lookup in a step prior to send email to get the Full Name.

Hope that helps.



May 12, 2009 at 11:04 PM


Which column do you use to lookup on? I tried "Work E-mail" and it seemed to bring back and thus fails with the same error. If I hardcode in a valid@email.address it succeeds, so I seem to be using the wrong property. Any suggestions would be appreciated.



May 12, 2009 at 11:49 PM

Sorry I guess I really didn't read your inital question clearly. I use a hard coded, looking like this: List Admin <>

This needs to be a valid email address in email server.  

It looks like this:

Lookup LinkTitle property for ListName:Created By, store in Variable: vFullName

LinkTitle is Full Name

To retrieve a user's email address use "E-Mail".

Hope that helps.


PS. I used this to it gives you a lot of info to look through.

May 13, 2009 at 12:25 AM

Thanks, Chris! It turns out the WSS 3.0 Property needed here is called "Work e-mail" and *is* case-sensitive for whatever reason. It also seems that when I do a simple lookup in advance in the SPD w/f per your recipe, it returns "mailto:" as part of the string preceding the email address, which also chokes the "Useful" assembly with the "invalid form" exception I posted about initially. So, I did what any idiot spending way too much time looking for a solution to trivial problem would do (hacked the code):



<font size="2" color="#0000ff"><font size="2" color="#0000ff">


</font></font><font size="2" color="#0000ff">



from = Common.ProcessStringField(executionContext, this.RecipientFrom);

<font size="2">



if (from.StartsWith("mailto:"))

from = from.Substring(7);

<font size="2">