From ebec8c859571f04d6bd1d8f116446f12d579fb7c Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 21 Jun 2016 11:40:31 +0200 Subject: [PATCH] Correct mail settings validation --- src/pretix/control/forms/event.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pretix/control/forms/event.py b/src/pretix/control/forms/event.py index e19533fe14..6387999762 100644 --- a/src/pretix/control/forms/event.py +++ b/src/pretix/control/forms/event.py @@ -339,6 +339,9 @@ class MailSettingsForm(SettingsForm): # Python's smtplib does not support password-less schemes anyway. data['smtp_password'] = self.initial.get('smtp_password') + if data.get('smtp_use_tls') and data.get('smtp_use_ssl'): + raise ValidationError(_('You can activate either SSL or STARTTLS security, but not both at the same time.')) + class TicketSettingsForm(SettingsForm): ticket_download = forms.BooleanField(