---
title: "Message basics · Agent Wranglers"
url: https://agentwranglers.se/playbook/email/message-basics
updated: 2026-10-20
licence: "All rights reserved"
---

# Message basics

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

> Build every message to the internet standards, with the right headers, a plain-text part, UTF-8, a declared language and a size inboxes accept.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers email playbook: https://agentwranglers.se/playbook/email/message-basics`.

## Required

- [Send the headers every message needs](https://agentwranglers.se/playbook/email/message-basics/required-headers): Give every message exactly one `From`, `To`, `Subject`, `Date` and `Message-ID`, in the format RFC 5322 sets out.
- [Include a plain-text part](https://agentwranglers.se/playbook/email/message-basics/plain-text-part): Send HTML email as `multipart/alternative`, with a plain-text part first and the HTML part last.
- [Encode everything as UTF-8](https://agentwranglers.se/playbook/email/message-basics/utf-8): Declare `charset=UTF-8` on every text part, and encode non-ASCII characters in headers as RFC 2047 encoded words.
- [Declare the language and text direction](https://agentwranglers.se/playbook/email/message-basics/language-and-direction): State the message language in a `Content-Language` header. In HTML mail, also set it on the root, and set `dir` for right-to-left languages.
- [Keep messages small](https://agentwranglers.se/playbook/email/message-basics/message-size): Keep the HTML part under 100 KB and the whole message under 5 MB. Link to large files instead of attaching them.

## Recommended

- [Point replies to a mailbox someone reads](https://agentwranglers.se/playbook/email/message-basics/reply-to): Send from an address that accepts replies, or set `Reply-To` to one that does. Never send from an address that bounces.
- [Accept international addresses](https://agentwranglers.se/playbook/email/message-basics/international-addresses): Accept and store email addresses with non-ASCII characters, and send to them through servers that support SMTPUTF8.
- [Mark automated messages](https://agentwranglers.se/playbook/email/message-basics/auto-submitted): Add `Auto-Submitted: auto-generated` to messages a system sends on its own, such as receipts, alerts and password resets.

- Next: [Sending domain and authentication](https://agentwranglers.se/playbook/email/sending-domain-and-authentication)
- [All chapters](https://agentwranglers.se/playbook/email)
