Back to Aws Doc Sdk Examples

33 SPEC SEND

scenarios/features/sesv2_weekly_mailer/content/33_SPEC_SEND.md

latest1002 B
Original Source

Send the Coupon Newsletter

  1. Retrieve the list of contacts from the weekly-coupons-newsletter contact list.

    • API Call: ListContacts
    • Parameters:
      • ContactListName: weekly-coupons-newsletter
  2. Send an email using the weekly-coupons template to each contact in the list.

    • API Call: SendEmail
    • Parameters:
      • Destination:
        • ToAddresses: (List of email addresses from the ListContacts response)
      • Content:
        • Template:
          • TemplateName: weekly-coupons
          • TemplateData: JSON string representing an object with one key, coupons, which is an array of coupon items. Each coupon entry in the array should have one key, details, with the details of the coupon. See sample_coupons.json.
      • FromEmailAddress: (Use the verified email address)

For more information on using templates with SES v2, refer to the official documentation: https://docs.aws.amazon.com/ses/latest/dg/send-personalized-email-api.html