Commit 53ace96d authored by Chris Reffett's avatar Chris Reffett
Browse files

Don't try to send email if email host/port undefined

parent 18c4be9d
...@@ -227,11 +227,13 @@ def signup(request): ...@@ -227,11 +227,13 @@ def signup(request):
full_name = signup_form.cleaned_data.get('full_name') full_name = signup_form.cleaned_data.get('full_name')
description = signup_form.cleaned_data.get('description') description = signup_form.cleaned_data.get('description')
send_mail('Signup from %s' % (username), '%s signed up at %s\n' # Only send mail if we've defined the mailserver
'Username: %s\nMessage: %s\nPlease attend to this request at ' if settings.EMAIL_HOST and settings.EMAIL_PORT:
'your earliest convenience.' % (str(full_name), send_mail('Signup from %s' % (username), '%s signed up at %s\n'
str(, str(username), str(description)), 'Username: %s\nMessage: %s\nPlease attend to this request at '
settings.EMAIL_FROM, [settings.EMAIL_TO]) 'your earliest convenience.' % (str(full_name),
str(, str(username), str(description)),
settings.EMAIL_FROM, [settings.EMAIL_TO])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment