Quantcast
Channel: SharePoint 2013 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 26374

Sending one email to multiple recipients - only one gets the email

$
0
0
I'm using Sharepoint 2007 and in my custom code I need to send one email, with multiple recipients specified in the "To" field.  The problem I'm having is that the code execution succeeds but only one user receives the email even though the one that receives it can see in this email that there are two email addresses specified in the "To" field.  Also, when he clicks ReplyToAll, he can only reply to whoever sent the email and not to everyone specified.  Here is the code (I replaced the real email addresses with some fake ones):

        string toField = "user1@yahoo.com,user2@yahoo.com";
        string subject = "subject";
        string body = "email body";
        return SPUtility.SendEmail(SPContext.Current.Web, false, false, toField, subject, body);

I tried it both using SPUtility.SendEmail and using the .NET SmtpClient.  In both cases only ONE user receives this email.

thanks


Viewing all articles
Browse latest Browse all 26374

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>