Skip to content

Document tokenized From addresses for Emails#727

Open
promptless-for-oss wants to merge 9 commits into
mautic:7.2from
Promptless:promptless/tokenized-from-addresses
Open

Document tokenized From addresses for Emails#727
promptless-for-oss wants to merge 9 commits into
mautic:7.2from
Promptless:promptless/tokenized-from-addresses

Conversation

@promptless-for-oss
Copy link
Copy Markdown

Open this suggestion in Promptless to view citations and reasoning process

Add documentation explaining how to use Contact field tokens in Email From address and name fields, including the sender resolution hierarchy that determines which From address Mautic uses.

Trigger Events


Tip: Use Slack message actions (⋯ menu → Update Docs) to capture doc updates without interrupting conversations 💬

Add documentation for using Contact field tokens in Email From address
and name fields, including:

- New section explaining tokenized From addresses in emails.rst
- Sender resolution hierarchy showing priority order
- Updated Email Settings in settings.rst to mention token support
- Clarified Mailer is owner behavior with tokenized addresses

Relates to mautic/mautic#16060
Comment thread docs/channels/emails.rst

It's also possible to override the 'from' field in an Email with a token from your :doc:`/contacts/custom_fields` since Mautic 5.1.

Check the :doc:`/configuration/variables` documentation for a list of all the available default fields.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added tokenized From addresses documentation based on PR #16060 which enables Contact field tokens in FromEmailHelper.php and MailHelper.php, implementing a sender resolution hierarchy: tokenized Advanced From > owner > plain Advanced From > system default (with token support).

Source: mautic/mautic#16060

Copy link
Copy Markdown
Contributor

@adiati98 adiati98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions

Comment thread docs/channels/emails.rst Outdated
Comment thread docs/channels/emails.rst Outdated
Comment thread docs/channels/emails.rst Outdated
Comment thread docs/configuration/settings.rst Outdated
Comment thread docs/configuration/settings.rst Outdated
- Fix code block indentation (use 3 spaces per RST convention)
- Add blank line after note directive
- Use #. for auto-numbered lists instead of explicit numbers
- Change "like" to "such as" per style guidelines
- Add missing comma after "For more information"
@promptless-for-oss
Copy link
Copy Markdown
Author

Thanks for the review feedback, @adiati98! I've addressed all 5 suggestions:

  1. ✅ Fixed code block indentation (3 spaces)
  2. ✅ Added blank line after .. note:: directive
  3. ✅ Changed numbered list to auto-numbered #. syntax with active voice
  4. ✅ Changed "like" to "such as" in Name to send mail as description
  5. ✅ Added missing comma after "For more information"

The changes have been pushed to the branch.

Copy link
Copy Markdown
Contributor

@adiati98 adiati98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions

Comment thread docs/channels/emails.rst
Comment thread docs/configuration/settings.rst Outdated
Comment thread docs/channels/emails.rst Outdated
Comment thread docs/channels/emails.rst
Comment thread docs/channels/emails.rst Outdated
Comment thread docs/channels/emails.rst Outdated
Comment thread docs/channels/emails.rst Outdated
Comment thread docs/channels/emails.rst Outdated
Comment thread docs/channels/emails.rst Outdated
Comment thread docs/channels/emails.rst Outdated
Apply all 11 suggestions from reviewer @adiati98:
- Add custom RST target anchors for cross-references
- Fix note admonition indentation and add ref links
- Add vale off/on around section heading
- Bold field names consistently throughout
- Improve wording for clarity
@promptless-for-oss
Copy link
Copy Markdown
Author

Thanks for the detailed review, @adiati98! I've addressed all 11 suggestions:

  1. ✅ Added .. _mailer as owner: target anchor
  2. ✅ Fixed note admonition indentation and updated with :ref: links
  3. ✅ Added .. _sender resolution hierarchy: target anchor
  4. ✅ Added vale off/on around "Tokenized From addresses" heading
  5. ✅ Updated intro sentence with bolded From address and From name
  6. ✅ Updated system-wide Email Settings bullet with proper field names
  7. ✅ Updated individual Email Advanced tab bullet
  8. ✅ Bolded From address in priority order intro
  9. ✅ Updated Tokenized Email Advanced From list item
  10. ✅ Updated Plain Email Advanced From list item
  11. ✅ Updated System default sender list item

The changes have been pushed to the branch. Please let me know if anything else needs adjustment.

Copy link
Copy Markdown
Contributor

@adiati98 adiati98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions

Comment thread docs/channels/emails.rst Outdated
Comment thread docs/channels/emails.rst Outdated
- Capitalize "Custom Field" per Mautic style conventions
- Convert passive voice "is enabled" to active voice "you enable"
@promptless-for-oss
Copy link
Copy Markdown
Author

Thanks for the review feedback, @adiati98! I've addressed both suggestions:

  1. Capitalized "Custom Field" — changed to match the reviewer's suggestion
  2. Converted passive to active voice — changed "If Mailer is owner is enabled" to "If you enable Mailer is owner"

The changes have been pushed to this branch.

Address PR review feedback:
- Indent note directive to be part of bullet point
- Use :ref: links to existing anchors
- Bold field names in the note text
@promptless-for-oss
Copy link
Copy Markdown
Author

Thanks for the review feedback, @adiati98! I've addressed the suggestion:

  1. Fixed note admonition indentation — Added 3-space indentation before .. note:: so it's properly nested under the "Mailer is owner" bullet point, with 6-space indentation for the note content
  2. Updated cross-reference links — Changed :doc:Mailer is owner</channels/emails> to `:ref:`mailer as owner and fixed the anchor reference from hyphenated to spaces: :ref:Sender resolution hierarchy``
  3. Bolded field names — Added bold formatting to Mailer is owner and Advanced in the note text

The changes have been pushed to this branch.

Comment thread docs/configuration/settings.rst Outdated
Address review feedback from @adiati98 to combine the two
cross-reference links into a single sentence for better readability.
@promptless-for-oss
Copy link
Copy Markdown
Author

Thanks for the suggestion, @adiati98! I've combined the two links into one sentence:

For more information, see :ref:mailer as owner and :ref:Sender resolution hierarchy<sender resolution hierarchy>.

The change has been pushed to this branch.

Comment thread docs/configuration/settings.rst Outdated
promptless Bot and others added 2 commits May 30, 2026 10:04
Address PR review feedback:
- Use 2-space indentation for note directive (was 3 spaces)
- Use 5-space indentation for note content (was 6 spaces)
- Simplify :ref:`Sender resolution hierarchy<sender resolution hierarchy>`
  to :ref:`sender resolution hierarchy` (lowercase, no custom text)
@promptless-for-oss
Copy link
Copy Markdown
Author

Thanks for the feedback, @adiati98! I've addressed both suggestions:

  1. Fixed note directive indentation — Changed from 3-space to 2-space indentation for the .. note:: directive, and from 6-space to 5-space for the note content, to match unordered list formatting conventions
  2. Simplified :ref: link — Changed :ref:Sender resolution hierarchy to `:ref:`sender resolution hierarchy (lowercase, no custom text)

The changes have been pushed to this branch.

Comment thread docs/channels/emails.rst Outdated
Addressed reviewer feedback: the note was duplicative because:
- The first sentence repeated the Owner sender description
- The link to sender resolution hierarchy was redundant since we're already in that section
- The same note exists in configuration/settings.rst

The essential information about SPF/DKIM requirements and per-Email configuration is already documented in configuration/settings.rst.
@promptless-for-oss
Copy link
Copy Markdown
Author

Thanks for the feedback! You're right — the note was redundant.

I've removed it since:

  1. The first sentence duplicated the Owner sender description above
  2. The link to sender resolution hierarchy was unnecessary within that same section
  3. The same note already exists in configuration/settings.rst

The essential information about SPF/DKIM requirements remains available in the configuration documentation for users who need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants