Open GH1995 opened 4 years ago
#!/usr/bin/env python3 # coding: utf-8 from email.mime.text import MIMEText import smtplib msg = MIMEText("hello, send by Python ...") from_addr = "postmaster@mg.iruc.live" password = "b2480ce531e7be2de3a0f1a6132900a" to_addr = "tulingjiaoyu@126.com" server = smtplib.SMTP("smtp.mailgun.org", 587) server.set_debuglevel(1) server.login(from_addr,password) server.sendmail(from_addr, [to_addr], msg.as_string()) server.quit()
发送HTML邮件 发送附件
SMTP 发送邮件
发送HTML邮件 发送附件