To me that would indicate it can resolve the name 'smtp-mail.outlook.com', 587
but that addresses does not look right to me should it not be 'smtp-mail.outlook.com:587' because 587 is the port you want to connect to.
I assume that the Python SMTPLIB concatenates the two parameters into the correct string.
I've used this code for 3 years now. And it's odd that Claws doesn't work either. The error in Claws does say smtp-mail.outlook.com:587
4 Pi's (3 * Jessie) and 1 * Stretch all do the same thing.
I've rebooted my router and that's changed nothing.
I've checked the Micro$oft maintenance page for outlook and there's nothing going on there - everything reports as good.
A ping from my Win10 PC gives
C:\Users\MarkH>ping smtp-mail.outlook.com
Pinging outlook-emeawest.office365.com [40.101.76.130] with 32 bytes of data:
Reply from 40.101.76.130: bytes=32 time=57ms TTL=235
Reply from 40.101.76.130: bytes=32 time=56ms TTL=235
Reply from 40.101.76.130: bytes=32 time=56ms TTL=235
Reply from 40.101.76.130: bytes=32 time=55ms TTL=235
Ping statistics for 40.101.76.130:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 55ms, Maximum = 57ms, Average = 56ms
A ping from my Pi gives
pi@PiScraper:~ $ ping smtp-mail.outlook.com
PING outlook-emeawest.office365.com (40.101.51.114) 56(84) bytes of data.
64 bytes from 40.101.51.114: icmp_seq=1 ttl=234 time=70.8 ms
64 bytes from 40.101.51.114: icmp_seq=2 ttl=234 time=76.6 ms
64 bytes from 40.101.51.114: icmp_seq=3 ttl=234 time=85.9 ms
64 bytes from 40.101.51.114: icmp_seq=4 ttl=234 time=73.8 ms
64 bytes from 40.101.51.114: icmp_seq=5 ttl=234 time=82.5 ms
64 bytes from 40.101.51.114: icmp_seq=6 ttl=234 time=76.1 ms
64 bytes from 40.101.51.114: icmp_seq=7 ttl=234 time=77.1 ms
64 bytes from 40.101.51.114: icmp_seq=8 ttl=234 time=77.0 ms
64 bytes from 40.101.51.114: icmp_seq=9 ttl=234 time=82.4 ms
64 bytes from 40.101.51.114: icmp_seq=10 ttl=234 time=85.7 ms
64 bytes from 40.101.51.114: icmp_seq=11 ttl=234 time=77.5 ms
64 bytes from 40.101.51.114: icmp_seq=12 ttl=234 time=76.9 ms
64 bytes from 40.101.51.114: icmp_seq=13 ttl=234 time=77.3 ms
64 bytes from 40.101.51.114: icmp_seq=14 ttl=234 time=75.5 ms
64 bytes from 40.101.51.114: icmp_seq=15 ttl=234 time=76.4 ms
64 bytes from 40.101.51.114: icmp_seq=16 ttl=234 time=74.6 ms
^C
--- outlook-emeawest.office365.com ping statistics ---
16 packets transmitted, 16 received, 0% packet loss, time 15018ms
rtt min/avg/max/mdev = 70.831/77.928/85.984/4.038 ms
Does that give any further useful info?
I really want to get this working again but I don't think it will. It MUST be a Pi problem as Win10 Thunderbird still works with the offending email address.
Thanks for any further help anyone can give me.