Commit ab6dabca authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Fix send mail error handling

# Fix send change email error message
# Remove double logging
parent cd5b8735
......@@ -132,7 +132,7 @@ VERIFICATION_SEND_ERR = EMAIL_SEND_ERR % 'verification'
INVITATION_SEND_ERR = EMAIL_SEND_ERR % 'invitation'
GREETING_SEND_ERR = EMAIL_SEND_ERR % 'greeting'
FEEDBACK_SEND_ERR = EMAIL_SEND_ERR % 'feedback'
CHANGE_EMAIL_SEND_ERR = EMAIL_SEND_ERR % 'feedback'
CHANGE_EMAIL_SEND_ERR = EMAIL_SEND_ERR % 'email change'
NOTIFICATION_SEND_ERR = EMAIL_SEND_ERR % 'notification'
DETAILED_NOTIFICATION_SEND_ERR = 'Failed to send %(subject)s notification to %(recipients)s.'
......
......@@ -547,7 +547,6 @@ def signup(request, template_name='im/signup.html', on_success='index', extra_co
return HttpResponseRedirect(reverse(on_success))
except SendMailError, e:
logger.exception(e)
status = messages.ERROR
message = e.message
messages.error(request, message)
......@@ -610,6 +609,7 @@ def feedback(request, template_name='im/feedback.html', email_template_name='im/
try:
send_feedback(msg, data, request.user, email_template_name)
except SendMailError, e:
message = e.message
messages.error(request, message)
else:
message = _(astakos_messages.FEEDBACK_SENT)
......
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