【问题标题】:commands to send messages in Python via the Poplib module?通过 Poplib 模块在 Python 中发送消息的命令?
【发布时间】:2008-12-29 10:24:51
【问题描述】:

我在网上找到了许多涉及通过 Poplib 下载消息的教程,但找不到任何解释如何创建新消息的内容。这存在吗?

【问题讨论】:

    标签: python email poplib


    【解决方案1】:

    正如 S.Lott 所说,您需要一些 smtp,但要创建实际的电子邮件,请使用标准库中的 email 包,然后使用消息的 as_string 方法发送它。

    An example with multipart MIME (how cool is that!)

    【讨论】:

      【解决方案2】:

      给自己发送一封电子邮件以创建消息。

      SMTP 是电子邮件用于发送的协议。在 Python 中,您可以在 smtplib 中找到它。

      有许多电子邮件 RFC。这里有一些。

      SMTP - RFC 821

      POP - RFC 1939

      IMAP - RFC 1730

      【讨论】:

        猜你喜欢
        • 2010-09-05
        • 1970-01-01
        • 2021-03-22
        • 2021-07-29
        • 2021-03-30
        • 2018-08-22
        • 1970-01-01
        • 2020-05-23
        • 2018-07-24
        相关资源
        最近更新 更多