Python3实现邮件发送功能 import smtplib from email.mime.text import MIMEText # 导入模块 class SendEmail: def send_emil(self, username, passwd, recv, title, content, mail_host='smtp.163.com', port=25): msg = MIMEText(content) #邮件内容 msg['Subject'] = title msg['From