import smtplib smtpserver = 'smtp.qq.com' fromaddr = 'fromaddr@qq.com' toaddrs = 'toaddr@qq.com' msg = 'Subject: This message is automatically sent through the python!' server = smtplib.SMTP(smtpserver) server.login(fromaddr, 'password') server.sendm…