zmail使用企业邮箱

版权声明: https://blog.csdn.net/t1anyuan/article/details/79957724
import zmail
# 你的邮件内容
mail = {
    'from':'zty',
    'to': 'hahaha',
    'subject': 'Success!',  # 随便填写
    'content': 'This message from zmail!',  # 随便填写
}

# 使用你的邮件账户名和密码登录服务器
server = zmail.server('[email protected]', 'pass','smtpserver_address')
# 发送邮件
server.send_mail('[email protected]', mail)
~                                                 

算是一个暂时的解决方案吧

已成功测试

猜你喜欢

转载自blog.csdn.net/t1anyuan/article/details/79957724