ASP.NET - Send bulk mail in parallel - fastest and most efficient way
05:41 19 Jun 2018

I want to send a newsletter to our site's registered users - more than 100000

Today, I send the mails in a simple for loop, which is very heavy and slow. I want it to finish the process as fast as possible (even if the process would run in the background and didn't bother the users' UI)

I tried TPL, Async, smtpClient.SendAsyncMail() and more, but never could actually create a working example that proves that these systems work faster (or work at all). I've read many posts and explanations using thread, but they seem to be old, deprecated or irrelevant, since there are new technologies I surely don't know of.

Could you please tell me what is the most efficient and fastest way to send multiple emails in parallel? Could you show me an example that works?

UPDATE 20/06/2018

Each email is different for each user. Therefore a BCC solution is irrelevant for me.

I will specify my question a little more: I only focus on the high-level where I use a sending function, such as ASP.NET smtpClient.Send() to send the mails to the SMTP.

I ignore for now the part of the SMTP itself. I have a great SMTP server that knows how to handle the queuing.

The main pitfall right now is the Send function that uploads the bytes to the SMTP server in ASP.NET. That's where I couldn't find a way to send faster. (It is needles to say that if I buy a stronger server, even an iterative method will work faster)

But I want a scalable solution - a smarter one, where I can send in parallel huge amounts of mails.

UPDATE 28/06/2018

Apparently a parallel solution will not solve my problem. As explained by @Terry Carmen and others, I may have to look at other bottle necks in the process. Thank you all for helping! What a great community!!!

asp.net vb.net email asynchronous task-parallel-library