It is something to do with Gmail. It happens almost 50% of the time for me.
Here is the error message from the Gmail server when sending mail from calibre-smtp:
Code:
reply: '421 4.7.0 Temporary System Problem. Try again later (SF). y15sm1441161weq.6\r\n'
reply: retcode (421); Msg: 4.7.0 Temporary System Problem. Try again later (SF). y15sm1441161weq.6
data: (421, '4.7.0 Temporary System Problem. Try again later (SF). y15sm1441161weq.6')
send: 'rset\r\n'
Python function terminated unexpectedly: Connection unexpectedly closed
Traceback (most recent call last):
File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.6/site.py", line 147, in main
return run_entry_point()
File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.6/site.py", line 116, in run_entry_point
return getattr(pmod, func)()
File "site-packages/calibre/utils/smtp.py", line 224, in main
File "site-packages/calibre/utils/smtp.py", line 104, in sendmail
File "lib/python2.6/smtplib.py", line 712, in sendmail
File "lib/python2.6/smtplib.py", line 438, in rset
File "lib/python2.6/smtplib.py", line 363, in docmd
File "lib/python2.6/smtplib.py", line 340, in getreply
smtplib.SMTPServerDisconnected: Connection unexpectedly closed
It's not just affecting Calibre. See more issues
here.
I can't see how this can be fixed, unless Calibre is changed to repeatedly retry sending the email...