Re: Question: Speed of SMTP dispatch (inside thread)

Giganews Newsgroups
Subject: Re: Question: Speed of SMTP dispatch (inside thread)
Posted by:  Grahame Grieve (graha…@kestral.com.au)
Date: Wed, 3 Sep 2003

Steve Forbes wrote:

> Hi Guys,
>
> I am sending a batch of emails via SMTP in a thread (which has
> tpNormal priority), and have a question about the speed at which the
> emails are being dispatched.
>
> My first cut of the code had the IdSMTP control connecting, sending
> the email then disconnecting for each email item, .. this seemed
> slow, and I guessed (incorrectly) that the connect/disconnect was
> causing the delay. I refactored the code and made the connect happen
> outside the send loop with a final disconnect, however, this did not
> result in any huge speed improvement. Each email takes between 2 to 5
> seconds to send, and as I potentially have hundreds to process in the
> batch, the whole process will be quite lengthy (although not a major
> issue as it is happening in a thread).  BTW, the thread does not seem
> to be the issue here as sending the batch inside the application
> context is also slow.
>
> I am wondering whether anyone has any suggestions, tips, or tricks on
> how to speed up sending SMTP emails, or is this common behaviour?
>
> Best regards
>
> Steve

it's common behaviour now. usually the delay is while
the SMTP Server checks you submission against the many
anti-spam rules it is running

Grahame

Replies

In response to

Question: Speed of SMTP dispatch (inside thread) posted by Steve Forbes on Wed, 3 Sep 2003