电子邮件包顶部的抽象层,使发送电子邮件更容易一些
easymail的Python项目详细描述
简易邮箱
==
[![构建状态](https://secure.travis-ci.org/mfussenegger/easymail.png?branch=master)(https://travis ci.org/mfussenegger/easymail)
pythons标准库中的电子邮件包是非常低级的。
easymail的目标是在上面添加一个抽象层,设置一些(希望是)sane
默认值。
这些默认值包括:
*默认使用utf-8编码。
*重要邮件头(如日期)
一个简单的示例:
来自easymail import email
来自smtplib import smtp
e=email('my name<;mymail@somedomain.com>;','recipient@otherdomain.org')
e.subject='hello world'
e.body='带有一些非字符'
smtp.sendmail(*e.args)
稍微高级一点:
easymail import email的附件
smtplib import smtp的附件
e=email('my name<;mymail@somedomain.com>;','recipient@otherdomain.org')
e.subject='hello world'
e.body='带一些非字符'
e.attachments.append(attachment('./path/to/picture.png')
e.attachments.append(attachment('./path/to/document.pdf')
smtp=smtp('mymailserver.com')
smtp.sendmail(*e.args)
dependencies
===
license
==
==
[![构建状态](https://secure.travis-ci.org/mfussenegger/easymail.png?branch=master)(https://travis ci.org/mfussenegger/easymail)
pythons标准库中的电子邮件包是非常低级的。
easymail的目标是在上面添加一个抽象层,设置一些(希望是)sane
默认值。
这些默认值包括:
*默认使用utf-8编码。
*重要邮件头(如日期)
一个简单的示例:
来自easymail import email
来自smtplib import smtp
e=email('my name<;mymail@somedomain.com>;','recipient@otherdomain.org')
e.subject='hello world'
e.body='带有一些非字符'
稍微高级一点:
easymail import email的附件
smtplib import smtp的附件
e=email('my name<;mymail@somedomain.com>;','recipient@otherdomain.org')
e.subject='hello world'
e.body='带一些非字符'
e.attachments.append(attachment('./path/to/picture.png')
e.attachments.append(attachment('./path/to/document.pdf')
smtp=smtp('mymailserver.com')
smtp.sendmail(*e.args)
dependencies
===
license
==