[Twisted-Python] send somes mails

William Dode wilk-ml at flibuste.net
Sun Sep 21 14:02:26 EDT 2003


Jp Calderone <exarkun at intarweb.us> writes:

> 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.

I'm very egoist, i want only to save the work of my programme and let all
the problems to the smarthost ;-). Because i don't want to deal with
queues and others things like that...

My goal is to send the mails to the smarthost the most quickly i
can. It's why i thought i could keep one connection open with the
smarthost.

-- 
William Dodé - http://flibuste.net




More information about the Twisted-Python mailing list