0

I am trying to send an email to multiple users using SP Utility Send Email I am using visual studio, c#

But i am facing issue, as i am trying to specify email addresses as a ,b

Should i be using ';' instead of ',' between accounts.

Thank you.

2

Separating the recipient addresses by commas is acceptable:

http://social.technet.microsoft.com/Forums/office/en-US/e68c8f84-cd95-4d9f-bcdf-2609b9cdf315/sending-one-email-to-multiple-recipients-only-one-gets-the-email?forum=sharepointgenerallegacy

You may want to try the same troubleshooting steps as shown in the accepted answer:

The string format of toField you use to send the email is correct, it seems not related with the method you use, so please check which user cannot not receive the email, then update the method to send email to the specific user, check whether the account still cannot. If not, check whether the account is correct, and make sure that send/receive for the account is ok.

Also, please note, according to http://msdn.microsoft.com/en-us/library/ms411989.aspx:

This method supports sending email messages only to valid SharePoint user email addresses.

If you still have problems, you can use the following method to specify the headers manually:

SPUtility.SendEmail method (SPWeb, StringDictionary, String)

Public static bool SendEmail(
    SPWeb web,
    StringDictionary messageHeaders,
    string messageBody
)

Here are some examples of specifiying multile recipients using the message headers:

0

The method on MSDN doesn't explicitly say how to delimit the users, standard convention is semi-colon delimited. If you are using commas and it isn't working, switch to semi-colons and see if that resolves your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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