import smtplib
from email.mime.text import MIMEText
from email.utils import formataddr
#发送邮件功能
def send_mail(send_message_txt,*senders_list,**send_to_people):
flag = True
try:
#编写发送的内容
send_msg = MIMEText(send_message_txt,"plain","utf-8")
send_msg["From"] = formataddr(["发送人姓名","邮箱账号"])
#f发送人的名单
for sender_name,mail_address in send_to_people.items():
send_msg["To"] = formataddr([sender_name,mail_address])
else:
print("添加所有发送人")
send_msg["Subject"] = "出现异常的sqlmap文件内容"
#登录邮箱服务器
send_server = smtplib.SMTP("smtp.126.com",25)
send_server.login("登录邮箱账号","邮箱密码")
#发送邮件
send_server.sendmail("zqgcy0808@126.com",senders_list,send_msg.as_string())
send_server.quit()
except Exception as e:
print(e)
flag = False
return flag
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有