可以接收MIME附件的Python SMTP服务器
我想实现一个简单的电子邮件服务器,就像亚马逊 Kindle 邮件服务器用于电子书转换一样。 用户将文档作为附件邮寄给我。邮件服务器将检索并存储这些文档。也许会向发送者回复有关转换结果的信息,只是成功或失败。 我想用Python来实现这个。查看内置的 SMTPServer 类,它只能处理 RFC2822 格式的消息正文。
有办法实现这个目标吗?谢谢
I want to implement a simple email server just like amazon kindle mail server does for ebook convert.
User mail me doc as attachment. Mail server will retrieve and store those doc. Maybe response back to sender about the convert result, simply success or failure.
I want to implement this in Python. Looking into the built in SMTPServer class, it only be able to handle RFC2822 formatted message body.
Is there anyway to achieve this? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“它只能处理 RFC2822 格式的消息正文。” - 这足以满足您想要实现的目标。 MIME 附件包含在 RFC 2822 扩展中。 python 电子邮件库包含各种函数来遍历消息有效负载并提取附件
"it only be able to handle RFC2822 formatted message body. " - thats enough for what you are trying to achieve. MIME attachments are covered in RFC 2822 extensions. the python email library contains various functions to walk through the message payload and extract attachments
您可以查看 Lamson,这是一个开发电子邮件应用程序的框架 + SMTP 服务器。
You could checkout Lamson, which is a framework + SMTP server developing email apps.