On 2011-03-02 13:04:16 -0800, Daniel Holth said:
I'm not using pyramid_mailer (yet?) but I love the underlying Lamson
library used to wrap Python's mail libraries. I just keep a
lamson.server.Relay() around to send mail through the local mail server
(no threadpool). Lamson is also a pretty cool way to receive e-mail.
While I can't really comment on the quality of Lamson (it certainly
seems from the website like it contains many useful features), I could
find no trace of a OOP Message class for the construction of MIME
messages. Things like lamson.server.Relay().deliver() accept raw MIME
messages, with secondary methods (send/reply) to construct /extremely/
limited messages for you.
Threading (or multi-process) is also vital for delivery of mail in
response to user actions. You don't want your controller/view to wait
for an entire SMTP negotiation and delivery session, and repeatedly
opening and closing connections is terribly wasteful. (And can make
the difference between one customized message every two seconds to 150
customized messages per second, which was what I last clocked TurboMail
at before MobileMe blacklisted my testing server. ;)
TurboMail does, in fact, make use of Python's built-in libraries to do
all of its work. The Message class simply takes all of the hassle of
managing Header, MIMEBase, MIMEImage, MIMEMultipart, MIMEText,
encode_base64, formatdate, make_msgid, and e-mail address formatting
out of the picture for developers utilizing it. You can have immediate
(non-threaded) delivery using the immediate "manager", threading using
the "ondemand" manager (with automatic load-based scaling of the worker
thread pool), and it would be fairly trivial to add local sendmail or
other non-SMTP transports.
— Alice.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.