import psutil import time import yagmail def sendmail(subject,contents): yag = yagmail.SMTP(user='155xxx8589@163.com',password='邮箱授权码',host='smtp.163.com') yag.send(to='15534828589@163.com',subject=subject,contents=contents) yag.close() def cpu(): cp…