How to use a custom EmailSenderProviderFactory

I’m trying to configure Keycloak to send the reset password email using AWS Simple Email Service HTTP API because I can’t use SMTP. I’ve created an EmailSenderProviderFactory as

and registered it in META-INF/service/ with the fully qualified class name.

When I deploy my jar to the standalone/deployments I can see that Keycloak detects it because I get a message in the log saying:
WARN [] (MSC service thread 1-6) KC-SERVICES0047: aws-ses-email-sender (com.example.AwsSesEmailSenderProviderFactory) is implementing the internal SPI emailSender. This SPI is internal and may change without notice

Can you give me some pointers on how to use my email sender instead of the Keycloak default one?

1 Like

Take a look at the spi-mail-template-override example in

The This SPI is internal and may change without notice message always gets displayed by the way, just a warning that the codebase can change in the future so you need to keep an eye on it when upgrading.

So the key seems to be to disable the default email sender provider by configuration. Thanks, will try that!