> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendpost.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Sending Emails via Amazon SES

> Send emails through Amazon SES using the SendPost API with automatic IP Pool routing.

Once your Amazon SES provider is configured and identities are set up, you can send emails through Amazon SES using the standard SendPost API.

<Note>
  **Important**: You must include the `ippool` parameter in your API request to route emails through Amazon SES. Use the IP Pool that was automatically created for your SES integration.
</Note>

***

## Basic Email Example

```bash theme={null}
curl -X POST "https://api.sendpost.io/api/v1/subaccount/email/" \
  -H "X-SubAccount-ApiKey: YOUR_SENDPOST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": {
      "email": "sender@yourdomain.com",
      "name": "Your Name"
    },
    "to": [{
      "email": "recipient@example.com",
      "name": "Recipient Name"
    }],
    "subject": "Hello from SendPost via Amazon SES",
    "htmlBody": "<h1>Hello!</h1><p>This email is sent through Amazon SES.</p>",
    "textBody": "Hello! This email is sent through Amazon SES.",
    "ippool": "ses-pool"
  }'
```

***

## Email with Personalization

```bash theme={null}
curl -X POST "https://api.sendpost.io/api/v1/subaccount/email/" \
  -H "X-SubAccount-ApiKey: YOUR_SENDPOST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": {
      "email": "sender@yourdomain.com",
      "name": "Your Company"
    },
    "to": [{
      "email": "john@example.com",
      "name": "John Doe",
      "customFields": {
        "firstName": "John",
        "accountType": "Premium"
      }
    }],
    "subject": "Welcome {{firstName}}!",
    "htmlBody": "<h1>Welcome {{firstName}}!</h1><p>Your {{accountType}} account is ready.</p>",
    "ippool": "ses-pool"
  }'
```

<Info>
  **Automatic Tracking**: Open and click tracking are automatically enabled in the configuration set. You don't need to include `trackOpens` or `trackClicks` parameters in your API requests.
</Info>

<Note>
  **Domain Verification**: If you're routing emails only through Amazon SES (no SendPost IPs in your IP Pool), you don't need to verify your domain in SendPost. Your domain only needs to be verified in Amazon SES. However, if your IP Pool includes SendPost IPs alongside SES, the domain must be verified in both.
</Note>

***

## Response

**Success Response** (HTTP 200):

```json theme={null}
[
  {
    "messageId": "abc123-def456-ghi789",
    "errorCode": 0,
    "to": "recipient@example.com"
  }
]
```

***

## Next Steps

* [Migrate from Amazon SES](/guides/amazon-ses/compatible-api) using the Amazon SES Compatible API
* [Understand event types](/guides/amazon-ses/event-types) for tracking email status
* [View analytics](/guides/amazon-ses/analytics) for your Amazon SES emails
* [Troubleshoot issues](/guides/amazon-ses/troubleshooting) if emails aren't sending
