Simple Mail Transfer Protocal Script Error

Viewed 43
Traceback (most recent call last):
  File "C:/Users/joshk/Desktop/LearningQt/LearnQt.py", line 14, in <module>
    server.login('joshuackeely@hotmail.com', password)
  File "C:\Users\joshk\AppData\Local\Programs\Python\Python38-32\lib\smtplib.py", line 700, in login
    raise SMTPNotSupportedError(
smtplib.SMTPNotSupportedError: SMTP AUTH extension not supported by server.

Says "SMTP AUTH extension not supported by server." Not sure if that means that @hotmail is supported or not, but I looked it up and I put:

server = smtplib.SMTP('smtp-mail.outlook.com', 25)

and it said it was supported online, I thought.

Any input is appreciated.

1 Answers

You need to do the connection before the login:

server = smtplib.SMTP("smtp-mail.outlook.com", 25)
server.connect("smtp-mail.outlook.com", 25)

And you probably want to use TLS instead, most providers only support connections with it.

Related