Mass Mailing help needed (Paul Rubin)
Stuart Bishop
zen at shangri-la.dropbear.id.au
Wed Apr 24 04:06:37 EDT 2002
On Wednesday, April 24, 2002, at 02:58 AM, Steve Holden wrote:
> "Graham Ashton" <gashton at cmedltd.com> wrote ...
>> On Tue, 2002-04-23 at 15:20, A.M. Kuchling wrote:
>>
>>> It's certainly possible to send multiple messages over a single SMTP
>>> connection,
>>
>> I must confess to not being that well up on the Python library with
>> regard to email messages. Are there any python modules that support
>> this?
>>
>
> The smtplib library is explicitly provided to allow your applications to
> make direct connections to SMTP servers.
And furthermore, using the Queue and Thread modules is pretty simple,
letting you open multiple connections to multiple upstream SMTP servers.
I tend to close and reopen them after I've hit an arbitrary threshold
of sent messages, mainly due to paranoia.
Calling sendmail directly can be good too, as you can specify synchronous
delivery on the command line (-O DeliveryMode=i I think...). This way
you can open 10 threads, each invoking sendmail in synchronous delivery
mode,
and know you have 10 simultanous outgoing connections but keep an empty
queue. This isn't possible with some MTA's such as Postfix. I
personally just hit my ISP's massive upstream SMTP servers as my tiny
20,000
user mailouts are rather insignificant when compared with all the other
users
on the cable network...
--
Stuart Bishop <zen at shangri-la.dropbear.id.au>
http://shangri-la.dropbear.id.au/
More information about the Python-list
mailing list