[MGNLMAIL-183] Add Reply-To support in templates package Created: 17/Aug/23  Updated: 13/Sep/23

Status: Open
Project: Magnolia Mail Module
Component/s: None
Affects Version/s: 5.6.0
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Richard Gange Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
dependency
is depended upon by MGNLFORM-393 Add Reply-To field to the form dialog Open
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

Currently we don't make use of the reply-to support offered in javax.mail.internet.MimeMessage. The class offers a method to take in an array of email addresses for Reply-To. See https://www.w3.org/Protocols/rfc822/

/**
     * Set the RFC 822 "Reply-To" header field. If the address 
     * parameter is <code>null</code>, this header is removed.
     *
     * @exception	IllegalWriteException if the underlying
     *			implementation does not support modification
     *			of existing values
     * @exception	IllegalStateException if this message is
     *			obtained from a READ_ONLY folder.
     * @exception	MessagingException for other failures
     */
    @Override
    public void setReplyTo(Address[] addresses)

Add support by:

  • Adding getter/setter to info.magnolia.module.mail.templates.MgnlEmail
  • Adding getter/setter to info.magnolia.module.mail.templates.impl.FreemarkerEmail

Update

  • After a closer look I do see that MgnlEmail does provide setReplyToList() which appears to take a "list" (String) delimited by \n characters. This might need to be expanded to handle a list delimited by commas OR maybe the dialog should have a text field with a rows property set so users get the intuition they can have multiple emails.
  • For FreemarkerEmail we need a setReplyTo() method but it's not quite clear how to handle processFreemarkerString() when the list is provided as a parameter. If the list is delimited by \n then I would guess it would make sense to change those out for commas.

Generated at Mon Feb 12 06:04:23 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.