When used python When implementing the code for sending e-mail , Often SMTPAuthenticationError： This mistake .
The error information is as follows ：
Encounter this mistake , How to solve it ？
If there is such a mistake , Just explain There is an authorization problem in the mailbox . That is, the mailbox SMTP The service is not turned on .
Next , We open the mailbox SMTP service .（ Here we use QQ Mailbox as an example ）
This service is only enabled in QQ Just set it in the mailbox client .
open QQ Mailbox client , Enter account , Password in . stay QQ Email page , Click on 【 Set up 】
Click in 【 Set up 】 Page in , Click on the second option ,【 Account 】, Slide down , When sliding down , The content as shown in the figure appears ：
ad locum , my SMTP The service is still closed , Click on 【 Turn on 】 Button , Turn on SMTP service . Then verify the SMS . After verification , There will be a pop-up ：
Okay , This authorization code , That's when we run the code , Enter the password where you entered it .( Be sure to remember )