小编ujj*_*wal的帖子

Sendgrid Python 包中的发件人名称

我正在尝试使用 Sendgrid Python 包发送电子邮件。

Sendgrid封装邮件功能:

class Mail(object):
    """Creates the response body for v3/mail/send"""

    def __init__(
            self,
            from_email=None,
            to_emails=None,
            subject=None,
            plain_text_content=None,
            html_content=None,
            amp_html_content=None,
            global_substitutions=None,
            is_multiple=False):
            ........
Run Code Online (Sandbox Code Playgroud)

我们将其用作:

message = Mail(
    from_email=self.current_from_email,
    to_emails=self.current_to_emails,
    subject=s_subject.format(...),
    html_content=s_body.format(...)
 )
Run Code Online (Sandbox Code Playgroud)

在邮件功能中无法设置发件人姓名。

那么,如何设置发件人姓名呢?

python sendgrid sendgrid-api-v3

4
推荐指数
1
解决办法
2525
查看次数

标签 统计

python ×1

sendgrid ×1

sendgrid-api-v3 ×1