I can not ship emails from Python three script with smtp library utilizing a digital machine in SUSE Linux Enterprise Server 11 SP4. Nonetheless, utilizing precisely the identical code from my Ubuntu 18.04 machine, works simply advantageous. Which makes me assume that the issue is system-related and never code-related.
What/the place can I search for, with a purpose to remedy this challenge? I’ve no admin rights
In case that helps somebody. The code I am utilizing is the next:
import smtplib
e mail = "myemail@mycompany.com"
password = "mypassword"
to = ["destination@dest.com"]
with smtplib.SMTP_SSL('mail.mycompany.com', 465) as smtp:
smtp.login(e mail, password)
topic = "testing mail sending"
physique = "the mail itself"
msg = "Topic: {}nn{}".format(topic, physique)
smtp.sendmail(e mail, to, msg)
After I ran the earlier in SUSE machine I get a TimeoutError: Connection timed out
.
I’ve tried so as to add a print(bool(smtp))
just under the with
block to verify if it will get to make a connection, nevertheless it by no means will get executed, which verify that there was no connection in any respect.