Build a Mass Sender

I want to create an application that will allow my customers to send marketing information by email. This will be a carefully controlled tool used only for legitimate mass mailing. It will have all the necessary unsubscribe functions, etc.

The solution will be built using VB.NET.

My question is about the best way to send email. We have an SMTP server in our data center that we can use. I think we could write some kind of multi-threaded Windows service to monitor the email database to send, and then make calls to the System.Net.Mail API to send through this server.

Is this what I need to improve performance, do I need to send mail to thousands of users in a reasonable time frame?

If not, should I look at things at a lower level by doing a DNS lookup in one thread, sending it directly to the appropriate server on port 25 in another thread, etc.?

Any pointers would be appreciated!


Not quite the answer - but an update for everyone who cares ... I'm currently looking at a product called ActiveMail from ActiveUp .

This seems to be the MTA (it executes its own MX requests and sends mail directly), and it comes with a multi-threaded queue application.

+2
source share
3 answers

I think it’s not so difficult to download something like that on your own. It will take a day or so to build. But you should be much better off using something existing.

However, some things that I found important when working with Bulk-Email:

Do not use your own SMTP to send.

Searching MX records for your recipients and connecting SMTPClient to their SMTP, this gives you the advantage that you get an instant error message when a mailbox is not found or something else is wrong, and you do not emphasize your own server.

There was also a small error in SmtpClient that caused me problems because the host name is not a fully qualified domain name (as requested by the SMTP specification), but a machine name (and an internal field inside SmtpClient). Some SMTP servers take this seriously and want a domain name instead, so I ended up setting this field to reflect the fully qualified domain name. (Hope this has been changed since)

+3
source

First of all, get a component for heavy lifting. I would recommend: aspnetmail

Setting up bulkmailing is as easy as downloading some sample code.
WebMailer: send 1000 email messages from a web page without a timeout.

The same provider also supplies mx record check / bounce mail checkers, etc. This solution is not free, but the time you save without pursuing errors / inconsistencies in the standard mail component will make it worthwhile.

Oh, and if you want a mass mail program to be placed on your desktop, which also comes: http://www.aspnetemail.com/rapidmailer/

+2
source

The question is not accurate enough, but I will try to answer it anyway. There are several factors limiting options. The best "path" really depends on your circumstances. How long do you work?

Implementing a large, low-level multi-threaded mail sending system will take a lot of time compared to the other option that you talked about. Of course, writing everything from scratch is much wider than using an SMTP server and .NET library to send letters.

There is also the issue of bandwidth between different data. Will the .NET application and database work on the same server as SMTP? If not, how does the bandwidth pipeline limit the maximum number of messages sent per second?

Personally, I am a big fan of keeping it simple. Reusing available software is a smart move if the clock is ticking. How often will you send thousands of letters? This interval will determine whether the time interval is reasonable or not. It is so small that you can end up with the system still working on the first "batch" when another version is ready to be sent?

+1
source

All Articles