hey for anyone who this may help i managed to find a solution to the problem, although i dont fully understand the code.
import smtplib
username='yonihalberstadt@outlook.com'
password='******'
mailServer = smtplib.SMTP('smtp-mail.outlook.com', 587)
mailServer.login(username, password)
msg = """
Hello!"""
mailServer.sendmail("yonihalberstadt@outlook.com",
"yonihalberstadt@outlook.com", msg)
hope this helps anyone with the same problem!
ps: if anyone could explain the followings lines of code to me would be great:
mailServer.ehlo()
mailServer.starttls()
mailServer.ehlo()
thx!