When an agent opens an email, the temptation is to hand the mailbox client's output straight to the model. That output is an internet message in the format defined by RFC 5322: a set of header fields (From, Reply-To, Return-Path, Received, Subject, Message-ID and so on) followed by a body that may be split into multiple MIME parts. The spec even warns that header and body content is not sanitized for display, which is why the format is a poor boundary on its own.
The security problem is structural, not a matter of prompt wording. LLMs receive system instructions and user or retrieved data as one stream of text and have no built-in mechanism to separate the two, which is why prompt injection has held the top slot in the OWASP Top 10 for LLM applications since its first edition. Indirect injection makes this concrete for mail: the attacker does not need to be a user of your system. They only need to be someone who can send the agent a message, or put text into a document or page the agent reads.
That matters because the attack surface is real, not theoretical. An empirical study of 1.2 billion URLs from 24.8 million hosts found 15,300 validated indirect prompt injection instances, with roughly 70% placed in non-rendered HTML such as headers, comments and metadata, aimed at machines rather than people in the wild study. Email is the same class of channel: a body, a signature block, an HTML comment, an alt attribute, a calendar invite description, a filename.
So the design decision sits one layer below test design: before you write the tests that check whether your agent resists injection, decide what the agent is even allowed to see. Parse first, then apply policy, then build the prompt from allowed fields only.



