[英]commands to send messages in Python via the Poplib module?
I've found a number of tutorials online involving downloading messages via Poplib, but haven't been able to find anything explaining how to create new messages. 我在网上找到了许多教程,这些教程涉及通过Poplib下载消息,但是找不到任何解释如何创建新消息的内容。 Does this exist?
是否存在?
As S.Lott rightly says, you will want some smtp, but to create the actual email, use the email package from the standard library, then use an message's as_string method to send it. 正如S.Lott正确说的那样,您需要一些smtp,但是要创建实际的电子邮件,请使用标准库中的电子邮件包,然后使用消息的as_string方法发送它。
An example with multipart MIME (how cool is that!) 多部分MIME的示例(这太酷了!)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.