---
title: "Outbound Email Adapter"
description: "Currently Email Service Required these body parameter as required field Request Parameters"
canonical: "https://docs.cm.com/marketplace/internal-comms-integrations/outbound-email-adapter"
---

# Outbound Email Adapter

> Currently Email Service Required these body parameter as required field Request Parameters

Source: https://docs.cm.com/marketplace/internal-comms-integrations/outbound-email-adapter

## Our Current Assumptions (Need Confirmation)

### Assumption 1: TwoWay Field → Email Field Mapping

Currently Email Service Required these body parameter as required field [Request Parameters](https://developers.cm.com/messaging/docs/send-transactional-email-request-parameters)

We assume the email adapter receives TwoWay fields as follows:

| TwoWay Field | Contains | Example |
| - | - | - |
| `Chat.ConversationClientId` | Customer's email (who sent the original email) (To) | `customer@example.com` |
| `Chat.ConversationHostId` | Sender address from customer's verified domain (From) | `noreply@example.com` |
| `Chat.ConversationHostName` | Display name (Required for From object in email API) | `Agent Assist` |

- Is this mapping correct?

- Is it possible to have a **dedicated message type** for email in Two Way?

---

To make the email mapping explicit and avoid relying on overloaded fields, we propose adding email `$type` to the TwoWay format:

### Add Email-Specific Message Type:

```json
{
  "conversationMessages": [
    {
      "$type": "email",
      "subject": "Re: Order #123",
      "text": "Hello, your order is confirmed.",
      "html": "<h1>Hello</h1><p>Your order is confirmed.</p>",
      "attachments": [
        {
          "fileName":"Name of the file with extension",
          "content":"Base64 encoded file content",
          "contentType":"MIME type of the file"
        }
      ]
    }
  ]
}
```
