Skip to content

Set a custom "To" header

Estimated time to read: 1 minute

When developing and testing email functionality, it's crucial to verify message content and delivery without sending emails to actual customer addresses. The custom "To" header feature allows you to override the recipient address while preserving the original recipient information in the email display, making it perfect for testing scenarios.

This functionality is particularly useful during development and quality assurance phases. You can configure your emails to show the intended customer address in the "To" field, but have the message actually delivered to your own mailbox or a test account. This way, you can validate email templates, personalization, and formatting without the risk of accidentally sending test messages to real users.

By adding a simple header parameter to your API requests, you can redirect all outgoing emails while maintaining the appearance and structure of production messages. Follow the example below to implement this feature in your testing workflow.

Example (API):

{
  "to": "customer@example.com",
  "subject": "Test Bounce Scenario",
  "text": "This is a message.",
  "headers": {
    "seseu-to": "dev@agency.com"
  }
}