You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding an attachment, the Content-Type header of the corresponding mime-part gets the 'filename' and 'name' of the attachment appended as additional parameters (see link below).
Our remote party is pretty picky about this header and wants us to remove these extra parameters from this header.
I could not find a good way to do that - this is why I wish I could opt-out from this behavior:
alternatively I was looking for some hook to modify the intermediate MimeMessage at some point between being built and being sent. (maybe the CustomMailer?)
after digging deeper into our problem, I found that only one of those parameters (namely the "filename") causes the problems at the remote side:
They expect the "name" parameter within the Content-Type header and the "filename" parameter within the Content-Disposition header.
So basically, it's the line 265 only (see above) which I try to disable.
(for now we forked the repository to do this manipulation by hand, but it would be great to have some kind of tool to access and modify the resulting MimeMessage in more detail)
I'm trying to remember why I left it in the Content-Type to begin with. Legacy? Backwards compatibility? I'm trying to figure out what I might break by simply removing it.
When adding an attachment, the Content-Type header of the corresponding mime-part gets the 'filename' and 'name' of the attachment appended as additional parameters (see link below).
Our remote party is pretty picky about this header and wants us to remove these extra parameters from this header.
I could not find a good way to do that - this is why I wish I could opt-out from this behavior:
simple-java-mail/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java
Lines 264 to 267 in cb2f7b2
The text was updated successfully, but these errors were encountered: