Hello,
I am trying to connect a python script to an account, but till now, I am only receiving this response from server side:
smtplib.SMTPAuthenticationError: (535, '5.7.3 Authentication unsuccessful [CH2PR16CA0021.namprd16.prod.outlook.com]')
With this script:
import smtplib
SERVER = "smtp.office365.com"
PORT = 587
PASS = ""
FROM = ""
TO = ""
MSG = "testing..."
server = smtplib.SMTP(SERVER, PORT, timeout=20)
#server.ehlo()
server.starttls()
server.login(FROM, PASS)
server.sendmail(FROM, TO, MSG)
server.quit()
From Admin console at office 365, Enable Security defaults are disabled, and from user the user account, SMTP AUTH is enabled.
I really dont know why its still not working.
Anyone knows?