I've been getting these errors intermittently from sending email from my django app. I send very few emails, so the number of these errors is alarming.
Sending email works intermittently as well when doing it by hand :
>>> from django.core.mail import send_mail
>>> send_mail('Subject here', 'Here is the message.', '[email protected]', ['[email protected]'], fail_silently=False)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/var/home/ptarjan/django-dev/mysite/django/core/mail.py", line 390, in send_mail
connection=connection).send()
File "/var/home/ptarjan/django-dev/mysite/django/core/mail.py", line 266, in send
return self.get_connection(fail_silently).send_messages([self])
File "/var/home/ptarjan/django-dev/mysite/django/core/mail.py", line 172, in send_messages
sent = self._send(message)
File "/var/home/ptarjan/django-dev/mysite/django/core/mail.py", line 186, in _send
email_message.message().as_string())
File "/usr/lib/python2.5/smtplib.py", line 704, in sendmail
(code,resp) = self.data(msg)
File "/usr/lib/python2.5/smtplib.py", line 494, in data
(code,msg)=self.getreply()
File "/usr/lib/python2.5/smtplib.py", line 352, in getreply
line = self.file.readline()
File "/usr/lib/python2.5/smtplib.py", line 160, in readline
chr = self.sslobj.read(1)
sslerror: The read operation timed out
>>> send_mail('Subject here', 'Here is the message.', '[email protected]', ['[email protected]'], fail_silently=False)
1
Am I misconfiguring something? Is gmail blocking me? Is gmail having problems and this is a side-effect?