Question about smtplib, and mail servers in general.

Peter Hansen peter at engcorp.com
Tue Sep 20 09:05:49 EDT 2005


Chris Dewin wrote:
> Hi. I've been thinking about using smtplib to run a mailing list from my website.
> 
> s = smtplib.SMTP("server")
> s.sendmail(fromaddress, toaddresess, msg)
> 
> I know that in this instance, the toaddresses variable can be a variable
> of type list.
> 
> Suppose the list contains well over 100 emails. Would that create some
> sort of drain on the mail server? Would I be better off doing it in some
> other way? 

Definitely consider a proper mailing list program like Mailman, as 
Daniel suggested.

In any case, unless the mail server will allow "relaying", which most 
don't these days (to prevent spamming), then it won't work the way you 
are hoping unless *all* the 100 addresses are local ones, to be 
delivered to users on the server you are sending the mail to.

If the addresses are scattered all over the planet, and the server 
allows relaying, then it's intended for exactly this sort of use (other 
than if it's spam ;-) ), and no, you won't be putting a "drain" on the 
server.

-Peter



More information about the Python-list mailing list