centos 7 keepalived故障邮件通知实战(附Python邮件发送脚本) ##################### sendmail.py begin ##################### #!/usr/bin/python -W # -*- coding: UTF-8 -*- from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from em
-- coding:utf-8 -- i = 0 while i < 10: #发送十次 import smtplib from email.mime.text import MIMEText from email.header import Header import time #延时设置 # 第三方 SMTP 服务 mail_host="smtp.qq.com" #设置服务器 mail_user="2971210921@qq.com" #发件人用户名 ma