[MAGNOLIA-1783] Mail attachments are joined twice Created: 16/Oct/07  Updated: 23/Jan/13  Resolved: 16/Mar/10

Status: Closed
Project: Magnolia
Component/s: mail
Affects Version/s: 3.5 RC1, 4.1.1
Fix Version/s: 4.0

Type: Bug Priority: Major
Reporter: Capitaine Harold Assignee: Teresa Miyar
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File HtmlEmail.patch    
Issue Links:
supersession
is superseded by MAGNOLIA-3136 mail module: attachments are added mu... Closed
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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

With some configuration, attachments are joined twice.
Way to reproduce it:

  • Create your own command to send the email.
  • Set in the context all the parameters needed to send an email, that includes from(test@email.com), to(test@email.com), type(freemarker), text(rendered body from freemarker file) and finally attachment (instance of MailAttachment).
  • The email is send but with two same attchments

So the current process is:

  • Create an instance of the email depending of the type (for this case freemarker)
  • Some others actions doesn't influence the process
  • set the body from resource file and as freemarker email extends html Email it sets the attachment
  • Then come back in the email creation process and set again the attchment

A way to solve this problem is to not add the attachment when the body is set and only after.

Look at the patch



 Comments   
Comment by Magnolia International [ 20/Jan/09 ]

Teresa, can you please check if this is still the case with 4.0 and update accordingly ?

Comment by Teresa Miyar [ 26/Jan/09 ]

Doesn't happen with the new mail module

Comment by Vivian Steller [ 16/Mar/10 ]

I still have the same issue with magnolia 4.1.1, and it's even worse: when you send a magnolia page as email, the attachments seem to get cached and re-added every time you send an email using the same template...

Comment by Magnolia International [ 16/Mar/10 ]

See MAGNOLIA-3136

Generated at Mon Feb 12 03:30:17 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.