I need to send email in my Pyramid application, and I'd like to set up
emailed exception reports like Pylons does.
I looked around and found 'pyramid_mailer' and 'pyramid_marrowmailer'.
Does anyone have any particular recommendations? I'll probably go with
'pyramid_mailer' because it looks more flexible: it can send a message
or save it to a debug directory or testing variables, either in
transaction or immediately. I may need immediate sending to tailor the
response ("Request sent" or "Try again later"). 'pyramid_marrowmailer'
says only works within a transaction.
I tried 'pyramid_mailer' and got it working in a test application,
although not yet to the point of switching modes seamlessly with just
a configuration change.
For emailed exceptions I found 'pyramid_errmail'
https://github.com/Pylons/pyramid_errmail
which uses 'pyramid_mailer', but it's not on PyPI, hasn't been updated
since Pyramid 1.2-dev (2011), has at least one major bug
('config.add_tween' now requires a dotted name, not a function
object), and I'm not sure if it's compatible with pyramid_mailer's
debug mode (it didn't write a file when I tried). However, I did get
it to email an HTML traceback, so at least that's something. Is anyone
using it, or is there anything better?
I also found 'pyramid_exclog', which logs exceptions to a Python
logger, which you can configure with an SMTP logging handler. But that
doesn't integrate with 'pyramid_mailer' or anything similar, so no
config settings or debug mode, which I'd like to have. Although it may
be the simplest and most foolproof code?
--
Mike Orr <
slugg...@gmail.com>