• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

Using an asynchronous send function

If I'd like to send  alarge volume of emails quickly, would I be smart to not use an asynchronous send function?

I imagine this could really slow things down??

Another way to get verification is to email myself ever 100 emails sent, right?

thanks for the help,
2 Solutions
Asynchronous operation is typically a matter of efficiency at the cost of resources.  The more outstanding asynchronous operations you have outstanding, the more system resources are consumed to manage them.  Within reason, it is more efficient because your app/thread can move on to other things while the asynchronoous operation take place in the background.

You could send a copy of all the mails to yourself, but that would seem like overhead.  Whether you send synchronously or asynchronously, all you know when you are done is that the mail server received the messages.  Whether they are actually delivered is not known.  Nor would it be known if you sent copies to yourself.  All you would know is that YOUR copy was successfully transmitted.

I see you have posted several questions on this subject.  What level of confirmation are you trying to achieve?
I would say it depends on how your application is organized.

If it is embedded in some interactive app, where the user does some work, then clicks the "Send a bunch of mail" button, then you need to get back to the user as soon as you can. If not, there's no reason to send the email faster than the SMTP server can process it.

If you need to buffer it for an interactive app, instead of buffering as you are now, in the queue of the SMTP server, you could write what you need to identify mail content, destination, etc to a database. Then have a database act as the buffer. You can put your mail processor into a windows service and eliminate the need for the asynchronous mail.


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now