Skip to content

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

Merged
sbrannen merged 1 commit into
spring-projects:masterfrom
douddle:patch-1
Sep 12, 2019
Merged

Add SVG mapping to mime.types file for JavaMail support#23629
sbrannen merged 1 commit into
spring-projects:masterfrom
douddle:patch-1

Conversation

@douddle

@douddle douddle commented Sep 12, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown

@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
Copy Markdown

@douddle Thank you for signing the Contributor License Agreement!

@sbrannen

Copy link
Copy Markdown
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
Copy Markdown
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.

4 participants