none
Issue in send email through web service RRS feed

  • Question

  • Hi,

    We have requirement to send out email to around 300 users on item modification. We are using the below code snippet to send out mails in bunches of 10 users( for more users it is throwing “Operation Timed Out” error) in a webservice and using the webservice call in SharePoint designer workflow.

    The webservice call expires waiting for the response from webservice and the work flow retrying itself which is initiating another call and users are receiving multiple emails. Is there any other way to achieve this? Please suggest.

    int sendCount = 0;

     

                            for (int userIndex = 0; userIndex < addressList.Count; userIndex++)

                            {

                                sendCount++;

                                mail.Bcc.Add(addressList[userIndex]);

                                if (sendCount == 10 || userIndex == addressList.Count - 1)

                                {

                                    smtp.Send(mail);

                                    mail.Bcc.Clear();

                                    sendCount = 0;

     

                                }

                            }

    Any help would be appreciated.

    Regards,

    Sudheer


    Thanks & Regards, Sudheer

    Tuesday, April 11, 2017 11:04 AM

Answers