diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-06-22 16:13:41 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-06-22 16:13:41 -0500 |
commit | 257b8ab62a6a5e04d60575a9766e5ed3503a15ed (patch) | |
tree | 5d998fd1b955cb180ad1010c07ec35b1fd945b1b /mediagoblin/tools/mail.py | |
parent | 75ee3de301e7bea30c40fe26d857bb6cc7878f82 (diff) | |
parent | 0c7fa7556ced34444db82d2d2d3b51b4f5327586 (diff) | |
download | mediagoblin-257b8ab62a6a5e04d60575a9766e5ed3503a15ed.tar.lz mediagoblin-257b8ab62a6a5e04d60575a9766e5ed3503a15ed.tar.xz mediagoblin-257b8ab62a6a5e04d60575a9766e5ed3503a15ed.zip |
Merge remote-tracking branch 'refs/remotes/joar/notifications'
Conflicts:
mediagoblin/db/migrations.py
Diffstat (limited to 'mediagoblin/tools/mail.py')
-rw-r--r-- | mediagoblin/tools/mail.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mediagoblin/tools/mail.py b/mediagoblin/tools/mail.py index 6886c859..0fabc5a9 100644 --- a/mediagoblin/tools/mail.py +++ b/mediagoblin/tools/mail.py @@ -90,7 +90,12 @@ def send_email(from_addr, to_addrs, subject, message_body): if common.TESTS_ENABLED or mg_globals.app_config['email_debug_mode']: mhost = FakeMhost() elif not mg_globals.app_config['email_debug_mode']: - mhost = smtplib.SMTP( + if mg_globals.app_config['email_smtp_use_ssl']: + smtp_init = smtplib.SMTP_SSL + else: + smtp_init = smtplib.SMTP + + mhost = smtp_init( mg_globals.app_config['email_smtp_host'], mg_globals.app_config['email_smtp_port']) |