十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
pip3 install exchangelib
#Author Kang
from exchangelib import DELEGATE, Account, Credentials, Message, Mailbox, HTMLBody
def Email(to, subject, body):
creds = Credentials(
username='zhoumingkang',
password='帐号验证的密码'
)
account = Account(
primary_smtp_address='zhoumingkang@cedarhd.com',
credentials=creds,
autodiscover=True,
access_type=DELEGATE
)
m = Message(
account=account,
subject=subject,
body=HTMLBody(body),
to_recipients = [Mailbox(email_address=to)]
)
m.send()
cpu = 80
mem = 70
message = '''-----------运维报告------------
CPU使用率:%s
可用内存:%s
''' %(cpu,mem)
Email("zhoumingkang@cedarhd.com","主题",message)
昆玉网站建设公司成都创新互联公司,昆玉网站设计制作,有大型网站制作公司丰富经验。已为昆玉成百上千提供企业网站建设服务。企业网站搭建\外贸营销网站建设要多少钱,请找那个售后服务好的昆玉做网站的公司定做!