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

Add SVG mapping to mime.types file for JavaMail support #23629

Merged
merged 1 commit into from Sep 12, 2019

Conversation

douddle
Copy link
Contributor

@douddle douddle commented Sep 12, 2019

I was trying to change my picture to SVG in a generated email. Now I understand why it was not working properly.

I was trying to change my picture to SVG in a generated email. Now I understand why it was not working properly.
@pivotal-issuemaster
Copy link

@douddle Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 12, 2019
@pivotal-issuemaster
Copy link

@douddle Thank you for signing the Contributor License Agreement!

@sbrannen
Copy link
Member

@douddle, are you using Spring's JavaMailSenderImpl to send the email?

If so, you can create your own mime.types file and instruct JavaMailSenderImpl to use it (instead of the default file) by supplying a custom configured instance of ConfigurableMimeFileTypeMap via JavaMailSenderImpl.setDefaultFileTypeMap(...). On the ConfigurableMimeFileTypeMap you can invoke setMappingLocation(...) with your custom mime.types file. Alternatively, you can invoke setMappings(...) on the ConfigurableMimeFileTypeMap to add an explicit SVG mapping.

@sbrannen sbrannen changed the title Add SVG image in the mime.types file Add SVG mapping to mime.types file for JavaMail Sep 12, 2019
@sbrannen sbrannen changed the title Add SVG mapping to mime.types file for JavaMail Add SVG mapping to mime.types file for JavaMail support Sep 12, 2019
@sbrannen sbrannen self-assigned this Sep 12, 2019
@sbrannen sbrannen added this to the 5.2 GA milestone Sep 12, 2019
@sbrannen sbrannen added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 12, 2019
@sbrannen sbrannen merged commit 93ddfb9 into spring-projects:master Sep 12, 2019
@sbrannen
Copy link
Member

This has been merged into master.

Thanks

sbrannen added a commit that referenced this pull request Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants