From 31d53a61376f198ed733aeb96f295a130128e299 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 4 Jul 2017 00:46:41 -0400 Subject: [PATCH] Add the Use TLS and Use SSL option to the Django SMTP mailing profile backend. Signed-off-by: Roberto Rosario --- mayan/apps/mailer/mailers.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/mayan/apps/mailer/mailers.py b/mayan/apps/mailer/mailers.py index 938bd0c573..2878fbe4bd 100644 --- a/mayan/apps/mailer/mailers.py +++ b/mayan/apps/mailer/mailers.py @@ -24,6 +24,28 @@ class DjangoSMTP(MailerBackend): 'help_text': _('Port to use for the SMTP server.'), 'required': False }, + { + 'name': 'use_tls', 'label': _('Use TLS'), + 'class': 'django.forms.BooleanField', 'default': False, + 'help_text': _( + 'Whether to use a TLS (secure) connection when talking to ' + 'the SMTP server. This is used for explicit TLS connections, ' + 'generally on port 587.' + ), 'required': False + }, + { + 'name': 'use_ssl', 'label': _('Use SSL'), + 'class': 'django.forms.BooleanField', 'default': False, + 'help_text': _( + 'Whether to use an implicit TLS (secure) connection when ' + 'talking to the SMTP server. In most email documentation ' + 'this type of TLS connection is referred to as SSL. It is ' + 'generally used on port 465. If you are experiencing ' + 'problems, see the explicit TLS setting "Use TLS". Note ' + 'that "Use TLS" and "Use SSL" are mutually exclusive, ' + 'so only set one of those settings to True.' + ), 'required': False + }, { 'name': 'user', 'label': _('Username'), 'class': 'django.forms.CharField', 'default': '',