📜  sendgrid 向多个收件人发送电子邮件 python 代码示例

📅  最后修改于: 2022-03-11 14:46:31.876000             🧑  作者: Mango

代码示例1
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import *

message = Mail(
    from_email='sender@example.com',
    to_emails=[To('test@example.com'), To('test2@example.com')],
    subject='Subject line',
    text_content='This is the message of your email',
)

sg = SendGridAPIClient(SENDGRID_API_KEY)
response = sg.send(message)