【问题标题】:AWS send email with template in pinpoint apiAWS在pinpoint api中发送带有模板的电子邮件
【发布时间】:2021-03-19 22:33:06
【问题描述】:

任何关于如何在 AWS for Python 中使用 pinpoint api 模板发送电子邮件的示例?

我正在尝试示例 https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/pinpoint-email.html#PinpointEmail.Client.send_email 但我没有成功

【问题讨论】:

    标签: python amazon-web-services aws-pinpoint


    【解决方案1】:

    终于用上了

    client      =   boto3.client('pinpoint-email', region_name=AWS_REGION)
    response = client.send_email(
                FromEmailAddress='SENDER',
                Destination={
                    'ToAddresses': ['TOADDRESSES']
                },
                Content={
                    'Template': {
                        'TemplateArn': TEMPLATE_ARN,
                        "TemplateData": json.dumps(TEMPLATE_DATA)
                    }
                }
            )
    
     
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-11-11
      • 1970-01-01
      • 1970-01-01
      • 2022-08-21
      • 2011-04-12
      • 1970-01-01
      • 2016-07-12
      相关资源
      最近更新 更多