Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting to MimeMessage results in an invalid Content-Disposition for attachments #103

Closed
fauvetg opened this issue Oct 3, 2017 · 2 comments

Comments

@fauvetg
Copy link

fauvetg commented Oct 3, 2017

Hello,

When building a MimeMessage from an Email with the class MimeMessageHelper, the resulting MimeMessage has a wrong Content-Disposition header for attachments. The size is attribute is not correct :

------=_Part_32_1708476334.1507045824508
Content-Type: application/pdf; filename=XXX.pdf; name=XXX
Content-Transfer-Encoding: base64
Content-Disposition: attachment; size=0; filename=XXX.pdf
Content-ID: <ATT_TE91266914>

...

Some mailers (reproduced on and Apple mailer and Horde) cannot open those attachments.

I don't have a fix to provide, but I think the bug is in method MimeMessageHelper#getBodyPartFromDatasource.

NB : we use version 4.2.1

@bbottema
Copy link
Owner

I'll look into it. Thanks for the report!

@bbottema bbottema added this to the 4.5.0 milestone Oct 21, 2017
@bbottema bbottema closed this as completed Nov 3, 2017
@bbottema bbottema changed the title Wrong Content-Disposition on attachments (size=0) Converting to MimeMessage results in an invalid Content-Disposition for attachments Dec 26, 2017
@bbottema
Copy link
Owner

Released as 5.0.0.rc1-SNAPSHOT. Add OSS' snapshots repo to find it in Maven.

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

No branches or pull requests

2 participants