Using an asynchronous send function

Posted on 2007-10-01
Last Modified: 2013-12-17
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,
Question by:newbieweb
    LVL 19

    Accepted Solution

    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?
    LVL 22

    Assisted Solution

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now