If the mail server is down and you want to make a subscription on the newsletter you get the following error:
Traceback (most recent call last):
File "/home/mono/.projects/zuks/zuks-django/core/views.py", line 69, in subscribeToNewsletter
mail.sendMail('info@zuks.org', [recp], text, 'ZUKS Newsletter Registrierung', display_unsubscribe=False)
File "/home/mono/.projects/zuks/zuks-django/core/mail.py", line 34, in sendMail
send_mail(subject, text, sender, [receiver.email], html_message=html)
File "/usr/lib64/python3.3/site-packages/django/core/mail/init.py", line 62, in send_mail
return mail.send()
File "/usr/lib64/python3.3/site-packages/django/core/mail/message.py", line 283, in send
return self.get_connection(fail_silently).send_messages([self])
File "/usr/lib64/python3.3/site-packages/django/core/mail/backends/smtp.py", line 92, in send_messages
new_conn_created = self.open()
File "/usr/lib64/python3.3/site-packages/django/core/mail/backends/smtp.py", line 50, in open
self.connection = connection_class(self.host, self.port, connection_params)
File "/usr/lib64/python3.3/smtplib.py", line 241, in init**
(code, msg) = self.connect(host, port)
File "/usr/lib64/python3.3/smtplib.py", line 320, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib64/python3.3/smtplib.py", line 291, in _get_socket
self.source_address)
File "/usr/lib64/python3.3/socket.py", line 435, in create_connection
raise err
File "/usr/lib64/python3.3/socket.py", line 426, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
So that was the first issue: the case is not catched. If you have multiple receiver in "sendMail" method it could be that he stops trying to send the remaining recipients.
2.) You get this message back from server (i wonder that it worked till here):
If the mail server is down and you want to make a subscription on the newsletter you get the following error:
So that was the first issue: the case is not catched. If you have multiple receiver in "sendMail" method it could be that he stops trying to send the remaining recipients.
2.) You get this message back from server (i wonder that it worked till here):
But this is not shown on the site. So there is no visual or textual feedback.