Send Email Extended problem

Nov 3, 2008 at 8:08 PM
Hello,
I'm trying to use the Send Email Extended action and I'm having a problem.  I can not seem to get the from field to work with a variable.  I tried using the 'Created By' from the list the workflow is linked to but that didn't work.  I got the error:

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 

I also tried using the Lookup User Info to store the e-mail address in a variable.  For some reason I couldn't get the WorkEmail to populate a string variables (type problem maybe).  If I could get that to work then I could use the variable in the Send Email Extended activity, but so far no luck getting the e-mail.

Has anyone been able to use a variable in the Send Email Extended activity?

Thanks,
Jan 29, 2009 at 8:41 PM
Hello,

I am also having this same problem. I have a project that I need to be able to use the create by to enumerate the senders email address. Any help is appreciated.

Thanks
Mar 7, 2009 at 5:59 PM
I was able to get an email to go back to the Created By user using the Send Email Extend activity.  However, I cannot get the workflow to trigger at all using the Email Sender or Email From with an inbound email enabled list.  I cannot believe how difficult this is...Microsoft completely dropped the ball on us.  I spent the whole day trying to get a simple email confirmation that would go back to a user that had a unique From/Reply-to email address.  16 hours later....still can't make this work.  Doesn't work in a VS 2008 Workflow SendEmail activity, and I can't get it to work using this activity either.   It does "work" just not with inbound email properties.
Mar 8, 2009 at 2:12 PM
I think your answer is in the following post: http://parkesy.wordpress.com/2008/07/18/sharepoint-incoming-emails-automatic-workflows-sorted-3/ 
Mar 8, 2009 at 6:39 PM
Edited Mar 8, 2009 at 6:40 PM
I HATE SHAREPOINT!  lol How utterly lame!  For anyone else who might stumble on this issue, here are the details...  They snuck in a change during a service pack that caused me about 2 days of grief. 

The KB article I mentioned above (KB953289) states the following

“To enable workflow’s to start using the impersonation scheme, a network farm administrator must understand the impersonation scheme and its implications. The network farm administrator must enable the workflow with the following command by using the Stsadm.exe command-line tool:

stsadm -o setproperty -pn declarativeworkflowautostartonemailenabled -pv true

Administrators can also create a special user account for creating workflow’s that all workflow authors can use. By doing this, administrators can prevent other people from impersonating specific workflow authors.”

Oh and yes, this fixed the issue.

Jun 5, 2009 at 8:10 PM

Hello,

I am using Send Email with List Item Attachments activity. I already have run stsadm command

stsadm -o setproperty -pn declarativeworkflowautostartonemailenabled -pv true

I am still getting an error message

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

Is there any other thing which I need to take care?

Thanks.

Jun 8, 2009 at 6:12 PM

I get this same error when sending an extended e-mail and setting up the workflow to e-mail a variable recipient, i did try to hard code an e-mail address as well and that didnt work. All other workflows i have set up are working properly and i have set this one up the same but this is the only one with the problem.

Any thoughts?

Nov 9, 2009 at 9:35 PM

I found that if the E-mail From field has a comma in the username...like "Jim Smith, PhD <jim.smith@sample.com> then you will get an error message.  Looking to find a way to replace any commas with a space or something.

Nov 9, 2009 at 10:24 PM

You can use a Replace Text action to replace all commas with blanks.

From: Hikmer [mailto:notifications@codeplex.com]
Sent: Monday, November 09, 2009 3:35 PM
To: Bolton, Shelly
Subject: Re: Send Email Extended problem [SPDActivities:39120]

From: Hikmer

I found that if the E-mail From field has a comma in the username...like "Jim Smith, PhD <jim.smith@sample.com> then you will get an error message. Looking to find a way to replace any commas with a space or something.

Read the full discussion online.

To add a post to this discussion, reply to this email (SPDActivities@discussions.codeplex.com)

To start a new discussion for this project, email SPDActivities@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jan 20, 2010 at 4:31 PM

I couldn't use a workflow lookup (Created By) in the 'Sender' or 'To' fields either. What worked for me, however, was to get the Work e-mail user property from the fiel first:

  1. Add one step at the beginning of the workflow and select the "Lookup site user property" action. It should now look like this: Lookup this user property for this user, store in Variable: variable1
  2. Click on the first this user and type Work e-mail or whatever your particular user profile property is (to make sure you are using the correct user property go and check your profile user properties under your shared services provider.
  3. Click on the second this user and then click on the function button. Select 'Created By' from the Field drop down list.
  4. You can store in variable1 or create your own more descriptive variable like AuthorMail or myCoolVar...
  5. Click the Finish button and test

Hope this helps.

Jun 16, 2010 at 10:29 PM

I absolutely love all your custom activities and it has helped me a huge deal... J

One small detail... I created a site and added a custom workflow on a request list BUT, detail is that I only gave contribute rights to all visitors to that specific list since most people should only read the info but everyone can create a request...

Contributors of the whole site have no problem... but the visitors (with contribute only to the Request list) get access denied when sending email... any idea on what else I need so this functionality works??