Integration Mode

The Email Gateway API's (Marketing and Transactional) offers an Integration Mode feature designed to validate requests and test the integration of your system with your logical account. This functionality ensures seamless integration without the risk of delivering test emails to actual recipients.

When an email is sent to a recipient with the domain @sink.cm.com, the Mail Transfer Agent (MTA) will accept and automatically drop the message. As a result, these emails will not be delivered to any recipient's mailbox. This allows you to safely test your integration and workflows without impacting real users or affecting your domain reputation.

Integration mode request:

curl -X POST "https://api.cm.com/email/gateway/v1/marketing" \
-H "Content-Type: application/json" \
-H "X-CM-PRODUCTTOKEN: your-product-token" \
-H "Sandbox-Mode: true" \
-d '{
  "fromAddress": "[email protected]",
  "fromName": "Store Promotions",
  "toAddresses": [
    {
      "toAddress": "[email protected]",
      "toName": "Customer One"
    },
    {
      "toAddress": "[email protected]",
      "toName": "Customer Two"
    }
  ],
  "ccs": [
    {
      "emailAddress": "[email protected]"
    }
  ],
  "subject": "Flash Sale - 50% Off Everything!",
  "htmlBody": "<h1>Flash Sale Alert!</h1><p>Everything in our store is 50% off for the next 24 hours!</p><p>Use code: FLASH50</p>",
  "textBody": "Flash Sale Alert! Everything in our store is 50% off for the next 24 hours! Use code: FLASH50",
  "customerReference": "flash-sale-march-2024"
}'

When using the Integration Mode feature, the system processes emails differently based on the recipient's domain. Below is a detailed explanation of how the feature works:

  • Standard Email Delivery:
  1. If an email is sent to an address such as [email protected] , the message will be delivered to the recipient's mailbox as expected.
  • Integration Testing with sink.cm.com:
  1. If the recipient's email address contains the domain sink.cm.com (e.g., [email protected]), the following will occur:
    1. The email will be processed by the system for all integration checks.
    2. The email will be forwarded to the Mail Transfer Agent (MTA), which will ultimately drop the email. This ensures the message is not delivered to any recipient's mailbox.
  • Email Counting:
  1. Emails sent to addresses with the domain sink.cm.com will still be counted toward the total number of emails sent. This allows you to track and monitor usage, even for integration tests.
  • Email Logs and Status:
  1. In the email application logs, messages sent to sink.cm.com will have a new Status value labeled as Integration. This status helps differentiate test emails from live emails in your logs and reporting.