#!/usr/bin/env python3 #coding: utf-8 import smtplib from email.mime.text import MIMEText sender = '44444444444444444444g' receiver = '44444444444444444rg' subject = 'python email test' smtpserver = '4444444444444444444rg' username = '4444444444444444g' password = '44444444444444444444444' msg = MIMEText('

ja2磁盘使用超过80%

','html','utf-8') msg['Subject'] = subject smtp = smtplib.SMTP() smtp.connect(smtpserver) smtp.login(username, password) smtp.sendmail(sender, receiver, msg.as_string()) smtp.quit()