在asp.net发送大量电子邮件的最佳方法 [英] Best way for sending bulk email in asp.net

查看:99
本文介绍了在asp.net发送大量电子邮件的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,我需要发送个性化的电子邮件给注册会员。这不是我们广告程序(垃圾邮件),而从时间告知其状态的时间。已在批量发送电子邮件的数量高达3000的网站托管在Windows 2008服务器(VPS)和我已经安装SMTP IIS7上。

I have a website and I need to send personalized emails to registered members. This is not an advertizing procedure (spam) rather inform them of their status from time to time. The number of emails that have to be sent in batch are up to 3000. The website is hosted on windows 2008 Server (VPS) and I have installed SMTP on IIS7.

花一些时间阅读关于如何实现一种机制,通过asp.net发送大量电子邮件后,我感到有些困惑。

After spending some time reading on how to implement a mechanism for sending mass emails through asp.net, I feel a bit confused.

从我读我可以:


  • 在一个循环
  • 同步或异步(新线)送他们
  • prepare并把它们在拾取目录

  • 创建一个Windows服务,将检查现有队列

  • 从SQL Server 2008中(我有恩preSS)发送出去。

  • send them synchronously or asynchronously (new thread) in a loop
  • prepare and put them in pickup directory
  • create a windows service that would check for an existing queue
  • send them from sql server 2008 (I have express).

您可以请建议去最好的方法是什么?

Can you please suggest the best way to go with?

我本来就问题的黑色列出我的服务器?

Would I have problems regarding black-listing my server?

有没有更好的方法,这里就不提了,执行本?

Is there a better way, not mentioned here, for implementing this?

先谢谢了。

推荐答案

在被列入黑名单关于你的服务器,它并没有真正不管你多么发出同时,其更多的你把他们送到谁 。如果您将其发送给用户谁不想他们,他们报告你作为一个垃圾邮件发送者,那么你无疑会得到由多个DNS黑名单左右的网站之一列入黑名单。

In regards to your server being blacklisted, it doesn't really matter how much you send out "at a time" its more "who you send them to". If you send them to user who don't want them, and they report you as a spammer then you will undoubtedly get blacklisted by one of the many DNS blacklisting sites around.

务必确保人们在第一次使用双选择在系统选择,您发送电子邮件,如果他们应对激活账户,那么你可以给他们更多的电子邮件,如果他们不认为他们在输入错误的地址。

Always ensure that people opt in first using a double opt-in system, you send an email, if they respond to "activate the account" then you can send them more email, if they don't assume they typed in the wrong address.

在来处理的最佳方式来讲,我一直觉得最好的办法是写从该网站分别运行一个小的服务。你真的不希望使用同一个线程IIS服务来发送电子邮件。

In terms of the best way to process, I have always found the best way is to write a small service which runs separately from the site. You really don't want to be sending out emails using the same thread as the IIS service.

如果你想真正去为完全成熟的专业的方式。你想实现某种形式的消息队列系统(如的ActiveMQ或RabbitMQ的),你周围发送邮件,并把它们放进一个队列中,那么您需要创建一个Windows程序来听这些队列中的一个,当电子邮件附带在发送出去。这样,如果你的邮件处理器死亡,或者运行缓慢等等等等,你可能会带来更多的处理器,其连接到相同的队列多进程共享的工作(简单的分布)。

If you want to REALLY go for the full blown professional way. You would want to implement some form of message queue system (like ActiveMQ or RabbitMQ) which you send messages around in, and put them into a queue, you would then create a windows process to listen to one of those queues and when a email comes in send it out. That way if your mail processor dies, or is running slowly etc etc you could bring up more processors, connect it to the same queue and more processes share the job (simple distribution).

一个稍微不太复杂的方式,是使用FIFO队列,这将在数据库中轻松完成只是邮件保存到一个表,一个邮戳,并用SELECT TOP 10 * FROM OutgoingMail ORDER BY邮戳给他们ASC(记住并使用正确的索引),然后使用一个服务只是送出去的批次。

A slightly less complex way, would be to use a FIFO queue, which would be easily made in a database just save the emails to a table with a datestamp, and send them with a SELECT TOP 10 * FROM OutgoingMail ORDER BY datestamp ASC (remember and use proper indexes) then use a service to just send them out in batches.

非同步应尽量避免使用从IIS中这样的事情,你不想要的应用程序池回收通过你的工作一半。

Asynch should be avoided if possible from IIS for something like this, you don't want the app pool recycling half way through your job.

这篇关于在asp.net发送大量电子邮件的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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