Symfony provides a lot of helpful components, among those components, there is the MIME Component.
The Mime component allows manipulating the MIME messages used to send emails and provides utilities related to MIME types.
“and provides utilities related to MIME type”