Python sends QQ mail

Source: Internet
Author: User
Tags account security email account

#encoding =utf-8__author__ = ' ds ' #文件名称冲突from email.mime.text import mimetextimport smtplibif __name__ = = ' __main__ ':    msg = mimetext (_text= ' SMTP test ', _charset= ' utf-8 ')    #输入Email地址和口令:    from_addr = ' [email protected] '    Password = ' XXX '    # Enter SMTP server address:    smtp_server = ' smtp.qq.com '    # Enter recipient address:    to_addr = ' [email protected] '    #SMTP协议默认端口是25    Server = Smtplib. SMTP (smtp_server)    server.set_debuglevel (1)    #server. STARTTLS ()    #server. Connect (host=smtp_ Server, port=25)    #server. esmtp_features["auth"]= "Auth_login"    server.login (from_addr, password)    Server.sendmail (FROM_ADDR, [to_addr], msg.as_string ())    server.quit ()
After the test has been reported 454 error, the original QQ mailbox will mail the SMTP service closed, external inaccessible
Open the account security of QQ email account and open the SMTP service and POP3 service


Python sends QQ mail

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.