A lot of work of this project is from other people.
I've just put it together and provide example templates for how to use with keycloakify
Thanks to @sventorben for writing a keycloak email spi tutorial
Thanks to @bocca for supplying the already implemented cid code
Thanks to @keycloak for providing this program as open source
SPI List:
Source Code:
keycloak/keycloak#26347 (comment)
Tutorial:
https://conciso.de/keycloak-spis-implementieren-schritt-fuer-schritt/
Keycloak Docs:
https://www.keycloak.org/docs/25.0.4/server_development/index.html#_override_builtin_providers
Keycloak Sources:
Build the project with mvn package
Move the created email-provider-mime-0.1.jar
to the providers directory within the keycloak directory
Update the providers by either using start-dev or build
You can add --log-level="INFO,org.keycloak.email.DefaultEmailSenderProvider:debug"
as a start parameter to enable the debug logs of this module
You can view a fully working keycloakify example here
https://github.com/ckbaker10/keycloakify-starter/tree/email2fa-styling
The commit of interest is here: https://github.com/ckbaker10/keycloakify-starter/commit/5e94503e0084d3c026da70a311902f9f987d69a0
Using this provider allows for images to be displayed properly in email clients
Proof of the image beeing sent as mime part