Python包使电子邮件更容易处理。
sremail的Python项目详细描述
sremail公司
“SRE-Mail”是一个Python包,旨在以MIME格式发送电子邮件 格式简单多了。在
基本用途
fromdatetimeimportdatetimefromsremailimportmessage,smtpmsg=message.Message(to=["Sam Gibson <sgibson@glasswallsolutions.com>","a@b.com"],from_addresses=["another@email.com"],date=datetime.now(),another_header="test").attach("attachment.pdf")smtp.send(msg,"smtp.some_server.com:25")
哥查斯
- 不能用kwarg将
X-FileTrust-Tenant
头添加到Message
中,因为由于“Trust”中大写的“t”无法以一般方式格式化它。要解决此问题,您必须手动添加标题: ^{pr2}$ 在
发展
先决条件
- Python 3.6+
- Pipenv公司
快速启动
- 克隆此回购。在
- 运行
pipenv sync --dev
。在 - 你可以走了。可以使用
pipenv shell
,并使用IDE修改代码。在
- 项目
标签: