Frage

I'd like to configure a Pylons app, so that I get email on unhandled exceptions. So far I can't find the way to pass username and password for SMTP connection.

production.ini file:

..

[DEFAULT]
email_to = my_email@gmail.com
smtp_server = smtp.webfaction.com
error_email_from = info@mydomain.com  # this'd be a working email on webfaction

..

Please help.

War es hilfreich?

Lösung

If you want to access them in pylons.config then you want to put them in the [app:main] section of the configuration.

I've used turbomail, and then you can put them in [DEFAULT]. This is what my config looked like.

[DEFAULT]
mail.on = true
email_to = toaddress@domain.com
mail.manager = immediate
mail.transport = smtp
mail.provider = smtp
mail.smtp.server = smtp.domain.com
mail.smtp.username = username@domain.com
mail.smtp.password = passwordhere
error_email_from = paste@localhost
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top