Failing to send book by email

Bug #1730166 reported by Patrick
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

For the last couple months I've been having an issue where emails are not sending to my kindle email address. I've tried another hotmail account as well, and it results in the same error. (have not tried GMX)
hostname: smtp.live.com port:587
encryption: TLS

Calibre Version: 3.11.1 64-bit
Windows 10 64-bit

Sending a test email from my hotmail account results in the following log:

Traceback (most recent call last):
  File "site-packages\calibre\gui2\wizard\send_email.py", line 207, in test_email_settings
  File "site-packages\calibre\utils\smtp.py", line 149, in sendmail
  File "site-packages\calibre\utils\smtplib.py", line 667, in starttls
  File "site-packages\calibre\utils\smtplib.py", line 569, in ehlo_or_helo_if_needed
SMTPHeloError: (501, '5.5.4 Invalid domain name [MEXPR01CA0085.ausprd01.prod.outlook.com]')

Log:
connect: (u'smtp.live.com', 587)
connect: (u'smtp.live.com', 587)
reply: '220 MEXPR01CA0085.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sun, 5 Nov 2017 07:30:19 +0000\r\n'
reply: retcode (220); Msg: MEXPR01CA0085.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sun, 5 Nov 2017 07:30:19 +0000
connect: MEXPR01CA0085.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sun, 5 Nov 2017 07:30:19 +0000
send: 'ehlo .\r\n'
reply: '501 5.5.4 Invalid domain name [MEXPR01CA0085.ausprd01.prod.outlook.com]\r\n'
reply: retcode (501); Msg: 5.5.4 Invalid domain name [MEXPR01CA0085.ausprd01.prod.outlook.com]
send: 'helo .\r\n'
reply: '501 5.5.4 Invalid domain name [MEXPR01CA0085.ausprd01.prod.outlook.com]\r\n'
reply: retcode (501); Msg: 5.5.4 Invalid domain name [MEXPR01CA0085.ausprd01.prod.outlook.com]

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1730166

Your computers hostname is resolving a single period, that is causing
the problem. I'll add a workaround for it int he next release, or you
can change the hostname and you should be fine.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
Revision history for this message
Patrick (wowco) wrote :

Cheers! When I type hostname in cmd, it actually returns my computers name. Not sure why its a period, will just wait for the next update.

Revision history for this message
Patrick (wowco) wrote :

Ok I figured out why socket.getfqdn() was returning a period. I had an empty new line in my host file which was not commented out, for whatever reason after commenting it out it is now returning my hostname.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.