Skip to main content
Email properties control how an agent renders and sends an outbound email — the subject, body, HTML wrapper, signature, footer, and the rules that decide when to reply or close a thread. They live in the agent’s per-channel channel_properties under the email key and do not change what the agent says, only how the reply is delivered. To steer what the agent says on email (instructions, greeting, tool budget), use channel_overrides instead — see Per-channel configuration.

EmailProperties reference

Every field is optional; omit a field to take its default. The full block lives at channel_properties.email.
FieldTypeDefaultDescription
channel"email""email"Fixed discriminator for the email block.
enabledbooleantrueWhether the email channel is active for this agent.
body_templatestring{{agent_response}}Wraps the model’s reply. Rendered with Jinja; {{agent_response}} is the generated text.
body_formatmultipart | html | plaintextmultipartWhich MIME parts to send. html drops the plaintext part; plaintext drops the HTML part; multipart sends both.
subject_templatestringRe: {{subject}}Subject used once a thread exists. {{subject}} is replaced with the original inbound subject.
default_subjectstring | nullnullSubject for an agent-initiated email when none is supplied and no thread exists yet.
from_display_namestring | nullnullFriendly name on the From header, rendered as Name <address>. Also registered as an alias the reply gate recognizes when the agent is only CC’d.
signaturestring | nullnullMarkdown signature appended below the reply body, before the footer.
template_wrapperstring | nullnullBranded HTML shell with a {{body}} slot. The rendered HTML body is substituted into {{body}}.
include_unsubscribe_footerbooleantrueAppends a Reply STOP to unsubscribe. line to the body.
quote_historybooleanfalseQuotes the prior inbound beneath the reply, mail-client style.
cc_reply_policyconditional | never | alwaysconditionalWhat to do when the agent was only CC’d, not a direct To recipient.
require_dmarc_passbooleanfalseWhen true, the agent only replies to mail that passed DMARC.
auto_close_on_conclusionbooleantrueWhen true, close the conversation as soon as the reply gate judges it complete, instead of waiting for the idle timeout.

How the body is assembled

The renderer reuses the real delivery path, so the order is fixed:
1. body_template            -> body (Jinja, with {{agent_response}})
2. + signature              (if set)
3. + "Reply STOP" footer    (if include_unsubscribe_footer)
4. + quoted history         (if quote_history)
5. template_wrapper         wraps the HTML body via {{body}}
6. body_format              selects which MIME parts ship
The Markdown body is converted to HTML automatically. signature is also rendered from Markdown.
subject_template only applies once a thread exists — that is, when there is a prior inbound message to reply to. For the first message of a brand-new thread, the original subject is kept as-is, or default_subject is used for an agent-initiated send with no subject.

Reply and close behavior

cc_reply_policy, require_dmarc_pass, and auto_close_on_conclusion feed the reply-eligibility decision on every inbound message:
SettingEffect
require_dmarc_pass: trueInbound mail whose DMARC result is not pass is skipped — no reply.
cc_reply_policy: neverWhen the agent is only CC’d (not in To), skip the reply.
cc_reply_policy: alwaysWhen the agent is only CC’d, always reply.
cc_reply_policy: conditionalWhen the agent is only CC’d, defer to the reply gate, which decides whether the agent is addressed or needed.
auto_close_on_conclusion: trueIf the gate judges the conversation complete, close it proactively.
When the agent is a direct To recipient, it replies regardless of cc_reply_policy. Any uncertainty defaults to replying and not closing. For more on threading, recipients, and gating, see Threading and replies.

Per-channel overrides

channel_properties governs delivery; channel_overrides governs the model. The email override block (channel_overrides.email) accepts:
FieldTypeDefaultDescription
instructionsstring | nullnullExtra steering for the email channel.
instructions_modeappend | replaceappendappend adds to the base instructions; replace swaps them out entirely.
starting_messageobject | nullnullPer-channel greeting, used in place of the base starting message.
max_tool_stepsinteger | nullnullTool-call budget per turn for this channel. Falls back to the base config, then to 3.
See Per-channel configuration for the override model in full.

Preview the rendered email

POST /core/messaging/preview runs the real renderer against a sample agent response and returns exactly what would be delivered — subject, HTML, and plaintext — without sending anything. The agent editor uses this for the live preview. Requires either the agents:read or agents:manage scope.
curl -X POST https://api.anyreach.ai/core/messaging/preview \
  -H "Authorization: Bearer <token>" \
  -H "X-Anyreach-Org: <organization_id>" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "email",
    "properties": {
      "signature": "Best,\nThe Acme Team",
      "include_unsubscribe_footer": true,
      "body_format": "multipart"
    },
    "sample_agent_response": "Yes — we ship to Canada in 3-5 business days.",
    "context": { "subject": "Do you ship to Canada?" }
  }'

Request body

FieldTypeDefaultDescription
channelemail | text | smsrequiredChannel to render.
propertiesobject{}The channel properties block (here, EmailProperties fields).
sample_agent_responsestringYes — we ship to Canada in 3-5 business days.The model output to wrap and render.
contextobject | nullnullTemplate variables. For email, subject seeds the original-subject substitution.

Response

{
  "subject": "Re: Do you ship to Canada?",
  "html": "<p>Yes — we ship to Canada in 3-5 business days.</p>...",
  "plaintext": "Yes — we ship to Canada in 3-5 business days...."
}
For text and sms channels, subject and html are null and only plaintext is populated.

Per-channel configuration

Steer instructions, greeting, and tool budget per channel.

Threading and replies

How threads, recipients, and the reply gate work.