在ASP.Net中使用SMTP服务器进行批量邮件 [英] Bulk mailing using SMTP server in ASP.Net

查看:72
本文介绍了在ASP.Net中使用SMTP服务器进行批量邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将向所有注册了此服务的用户免费发送新闻通讯.由于这些新闻通讯是免费发送的,因此我们预计一个月内至少有5000名订阅者.我担心使用SMTP服务器概念的批量邮件是否会引起某些问题.首先,我们考虑开发一种Windows服务,该服务会定期自动将邮件发送给订阅者,但是商业用户已经要求新闻通讯应由管理员编辑,然后只能邮寄给用户,因此我们必须在网站本身中开发此功能!.我在数据表中获取特定用户的订户,然后将其邮寄到for循环内的每个用户,这会导致性能问题吗?该代码粘贴在下面:

We are sending free newsletters to all users who have registered for this service. Since these newsletters are sent free of cost we expect at least 5000 subscribers within a month. I am worried whether bulk mailing using SMTP server concept will cause some issue. First we thought of developing a windows service which would automatically mail to subscribers on periodical basis but the business users have given requirement that the newsletters should be editable by the admin and then only mailed to users so we had to develop this functionality in website itself!. I get the subscribers for the particular user in data table and then mail to each user inside for loop, will this cause any performance issue? The code is pasted below:

dsEmailds.Tables [0]包含新闻订阅者列表.

dsEmailds.Tables[0] has list of newsletter subscribers.

for (iCnt = 0; iCnt < dsEmailIds.Tables[0].Rows.Count; iCnt++)
{
    MailMessage msg = new MailMessage();
    msg.From = new MailAddress("newsletters@domainname.com", "test1");
    msg.To.Add(dsEmailIds.Tables[0].Rows[iCnt]["mailid"]);
    msg.IsBodyHtml = true;
    msg.Subject = subject;
    AlternateView av1 = AlternateView.CreateAlternateViewFromString(MailMsg, null, System.Net.Mime.MediaTypeNames.Text.Html);
        av1.LinkedResources.Add(lnkResLogo);
        av1.LinkedResources.Add(lnkResSalesProperty);
        av1.LinkedResources.Add(lnkResLeaseProperty);
        msg.AlternateViews.Add(av1);

SmtpClient objSMTPClient = new SmtpClient(System.Configuration.ConfigurationManager.AppSettings["mailserver"].ToString());
objSMTPClient.DeliveryMethod = SmtpDeliveryMethod.Network;
objSMTPClient.Send(msg);
}         

任何建议都会很棒!

推荐答案

您应该停止并考虑所有事情:

You should STOP and consider all sort of things:

  • 黑名单:您肯定会在严重的ISP的/邮件服务器中列出该数量,并且您需要证明接收到的用户要求发送此类电子邮件,然后等待1到他们删除标记的过程为3个月

  • Black List: with that amount you will for sure be balck listed in severeal ISP's / Mail Servers, and you need to prove that the received user asked for such email and wait 1 to 3 month process while they remove the flag

您需要分块发送电子邮件,每次发送不超过250个,使用不同IP的计算机发送更多电子邮件(更多块)

You need to send emails in blocks, not more than 250 at each time, use different IP's machines to send more emails (more blocks)

请阅读一些很好的指南来完成这些操作,您可以在 MailChimp

please read some nice guidelines for doing all this, you can find it in MailChimp and Campaign Monitor

免费电子邮件营销指南

您应该使用Mailchimp之类的服务(现在免费提供1000个订阅,一个月发送3000个),但价格为

You should use a service, like Mailchimp (now it's free to 1000 subscribes, 3000 sends a month) but prices are very cheap and they have an API that you can easily add, create, send and you will get all those nice reports on how opened, what did they do, etc ...

广告系列监控器也很棒,但是价格更高,但您可以将整个用户界面打上烙印并作为服务出售给客户(如果您打算在不久的将来做这样的事情).

Campaign Monitor is fantastic as well, but a little bit more expensive but great as you can brand the entire UI and sell as a service to your customers (if you are thinking of doing such thing in the near future).

希望对您有帮助.

尝试一下,我是一个快乐的客户.

give them a try, I'm a happy customer.

这篇关于在ASP.Net中使用SMTP服务器进行批量邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆