Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Postbox
  • Getting started
    • All guides
    • Creating an address
    • Domain ownership check
    • Setting up a DMARC policy
    • Sending an email
    • Templating an email
    • Bulk emailing
    • Creating a configuration
    • Linking a configuration to an address
    • Limiting the list of senders
    • Writing logs
    • Viewing information about sent emails
  • Access management
  • Pricing policy
  • Metrics Monitoring
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Getting started
  • Sending emails
  1. Step-by-step guides
  2. Bulk emailing

Bulk email sending

Written by
Yandex Cloud
Updated at July 8, 2026
View in Markdown
  • Getting started
  • Sending emails

Using the SendBulkEmail method, you can send multiple template emails in one request. Such a request contains a shared template and the emails to send. For each email, you can specify recipients, data to populate the template, headers, and tags.

Getting startedGetting started

  1. Create a service account in the folder as the address. If you create the service account and address in different folders, you will get an error when attempting to send an email.
  2. Assign the postbox.sender role to the service account.
  3. Create a static access key. Save the ID and secret key to a secure location. You will not be able to view the secret key properties again after you close the window.
  4. Configure the AWS CLI.

Sending emailsSending emails

  1. Prepare a bulk-email.json file:

    {
       "FromEmailAddress": "Alice <alice@example.com>",
       "DefaultContent": {
          "Template": {
             "Headers": [
                {
                   "Name": "List-Unsubscribe",
                   "Value": "<https://example.com/unsubscribe?user_id=sercet_hash>"
                }
             ],
             "TemplateContent": {
                "Subject": "Hello, {{name}}!",
                "Text": "Dear {{name}},\r\nYour order {{order_id}} is ready.",
                "Html": "<h1>Hello, {{name}}!</h1><p>Your order {{order_id}} is ready.</p>"
             },
             "TemplateData": "{\"order_id\":\"0000\"}"
          }
       },
       "BulkEmailEntries": [
          {
             "Destination": {
                "ToAddresses": [
                   "bob@example.com"
                ]
             },
             "ReplacementEmailContent": {
                "ReplacementTemplate": {
                   "ReplacementTemplateData": "{\"name\":\"Bob\",\"order_id\":\"1234\"}"
                }
             },
             "ReplacementHeaders": [
                {
                   "Name": "X-Customer-Segment",
                   "Value": "new"
                }
             ],
             "ReplacementTags": [
                {
                   "Name": "customer",
                   "Value": "bob"
                }
             ]
          },
          {
             "Destination": {
                "ToAddresses": [
                   "charlie@example.com"
                ]
             },
             "ReplacementEmailContent": {
                "ReplacementTemplate": {
                   "ReplacementTemplateData": "{\"name\":\"Charlie\",\"order_id\":\"5678\"}"
                }
             }
          }
       ],
       "DefaultEmailTags": [
          {
             "Name": "campaign",
             "Value": "orders"
          }
       ],
       "ConfigurationSetName": "ConfigSet"
    }
    

    Where:

    • FromEmailAddress: Sender's verified email address.
    • DefaultContent.Template.TemplateContent: Shared template for the email subject and body.
    • DefaultContent.Template.TemplateData: Default data to populate the template. The value must be a JSON object serialized to a string.
    • BulkEmailEntries: List of emails to send. For each list item, you can specify ReplacementTemplateData to override the template data for that specific email.
    • DefaultEmailTags and ReplacementTags: Email tags. Tags from ReplacementTags complement or override those from DefaultEmailTags.

    Note

    Template uses the Handlebars syntax and supports simple substitutions.

  2. Send emails:

    aws sesv2 send-bulk-email \
      --cli-input-json file://bulk-email.json \
      --endpoint-url https://postbox.cloud.yandex.net
    

    Result:

    {
       "BulkEmailEntryResults": [
          {
             "Status": "SUCCESS",
             "MessageId": "<email_ID>"
          },
          {
             "Status": "SUCCESS",
             "MessageId": "<email_ID>"
          }
       ]
    }
    

    The item order in BulkEmailEntryResults matches that in BulkEmailEntries. Where an individual email is not delivered, the returned result contains the error status and description in the Error field of the corresponding item.

See alsoSee also

  • SendBulkEmail method
  • Templating an email

Was the article helpful?

Previous
Templating an email
Next
Creating a configuration
© 2026 Direct Cursus Technology L.L.C.