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

# Custom Headers

> Inject custom RFC-compliant headers and metadata for routing or message tracking.

# Custom Headers

You can attach arbitrary custom headers to outbound messages for internal routing, CRM correlation, or RFC compliant message threading.

## Example Usage

```typescript theme={null}
await mailofly.emails.send({
  from: "support@yourdomain.com",
  to: ["customer@example.com"],
  subject: "Ticket #4082 Update",
  html: "<p>We have updated your support ticket.</p>",
  headers: {
    "X-Entity-Ref-ID": "ticket_4082",
    "In-Reply-To": "<msg_original_id@yourdomain.com>",
    "References": "<msg_original_id@yourdomain.com>"
  }
});
```

Mailofly preserves all custom headers matching `X-*` and standard email threading headers.


## Related topics

- [Introduction](/sending/introduction.md)
- [Send Test Emails](/sending/send-test-emails.md)
- [Email Content](/receiving/email-content.md)
- [Return Path](/domains/return-path.md)
