[Twisted-Python] send somes mails

Jp Calderone exarkun at intarweb.us
Sun Sep 21 12:34:49 EDT 2003

On Sun, Sep 21, 2003 at 10:24:31AM +0200, William Dode wrote:
> Jp Calderone <exarkun at intarweb.us> writes:
> > On Sat, Sep 20, 2003 at 01:36:20PM +0200, William Dode wrote:
> >> Hi,
> >> 
> >> Is it a good way to call smtp.sendmail() for sending a lot of mails
> >> (it's for a scrabble game, not spam !) It will connect and deconect for
> >> each mail isn't it ?
> >
> >   twisted.protocols.smtp.sendmail() is better
> It's what i use. But it's very slow and it call each time
> reactor.connect...

  Unless you are sending all the mail to users on a single host or you have
a smarthost which will relay your mail, you must make multiple connections.

  Of course, if you're sending to a smart host, it just means that that
server will have to go out and make connections to multiple hosts... So
you're not saving any work, you're just pushing it onto someone else.


Seduced, shaggy Samson snored.
She scissored short.  Sorely shorn,
Soon shackled slave, Samson sighed,
Silently scheming,
Sightlessly seeking
Some savage, spectacular suicide.
                -- Stanislaw Lem, "Cyberiad"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030921/be932d0c/attachment.pgp 

More information about the Twisted-Python mailing list