最终用户获得相同电子邮件内容的多个副本

时间:2017-01-27 08:29:16

标签: c# asp.net

我正在研究ASP.NET Web应用程序(C#语言)。我的任务之一是一次向1000到2000人发送电子邮件。

我遇到了一些问题,比如一些最终用户(电子邮件接收者)复制了相同电子邮件内容的多个副本。

此方法将根据从列表中获取的新电子邮件地址逐个调用。由于隐私,我删除了这种方法的一部分。

  [System.Web.Services.WebMethod]
        public static CampMaster SendMailContinue(int CustId)
        {
            try
            {

Customers Customer = null;
                    Customer = Customers.GetbyCustNextId(CustId,true).FirstOrDefault();

                string sTemplate = "Here will be Template content.";

                #region SendMail

                    if (IsValidEmail(Customer.Email))
                    {
                        if (Globals.SendMail(sTemplate, FromEmailAddress, FromName, ToEmail,EmailSubject))
                        {
                            //Sent Success
                        }
                    }
                sTemplate = string.Empty;

                return true;
                #endregion
            }
        }
        catch (System.Threading.ThreadAbortException)
        {
                return null;
        }
        catch (Exception ex)
        {
                return null;
        }

//通过调用WebMethod的客户端代码。

 function SendMailContinue(CustId, true) {
            PageMethods.SendMailContinue(CustId, true, OnGetSuccessSendMailContinue, OnGetFailureSendMailContinue);
            return false;
        }

0 个答案:

没有答案
相关问题