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