Bulk email - API instead of use SMTP protocol

Dear all,

Is it possible to send bulk email through API instead of use SMTP protocol in keycloak?

You can implement your own EmailSenderProvider. Take a look at the default for an example.

thank you for your reply.

Do you know if I can set Gmail API up to send bulk email? Looks like we still need to set smtp up.

I need to send 15 Millions email daily that’s why I wanna use Gmail API.

Once thank you.

Unless you have some special agreement with them, GMail is unlikely to allow you to send that many messages. For large numbers of messages, I’d suggest using a bulk email provider. I’ve personally had success with SendGrid, SparkPost and Amazon SES. All of those have SMTP endpoints that you can use from Keycloak without modification.

However, keep in mind that if you start blasting 15 million emails per day, and they have a high spam rate, any provider will shut you down immediately. Email sending is based on reputation, and it’s best to start slowly.

1 Like