Turbogears 2.2, use tls for error reporting

15 views
Skip to first unread message

a.p...@gmail.com

unread,
Mar 1, 2016, 10:36:49 AM3/1/16
to TurboGears
Hi

I have an old project running for about 2 years,
I want to configiure the error report emails to use an office365 account (smtp.office365.com)
In order to use the office365 smtp i need tls.

In a newer project (I think using 2.3.5) i use in production.ini:

trace_errors.smtp_use_tls
= true

Is there somthing I can use in my old tg2.2 project to use tls (using prodction.ini config)?
I cant seem to find how to do that

Thanks





Alessandro Molina

unread,
Mar 2, 2016, 6:45:29 PM3/2/16
to TurboGears
base_config['pylons.errorware']['smtp_use_tls'] = True in app_cfg.py should lead to the same behaviour in 2.2

Due to the way 2.2 configuration system worked, I'm not sure you can specify this in development.ini, you should probably try to set it in the same place where other error tracing options are set and see.

--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+...@googlegroups.com.
To post to this group, send email to turbo...@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

a.p...@gmail.com

unread,
Mar 8, 2016, 4:40:53 AM3/8/16
to TurboGears

Great, thanks a lot! (And thank you for your hard work on TurboGears)

Here are the changes I made in my app_cfg.py, using after_init_config override:



 

from tg.configuration import AppConfig
from pylons import config
...

class MyAppConfig(AppConfig):
   
def after_init_config(self):
   
config['pylons.errorware']['smtp_use_tls'] = True

base_config
= MyAppConfig()
...


I am once again able to receive error emails

Reply all
Reply to author
Forward
0 new messages