Class SendinblueSender


  • public class SendinblueSender
    extends Object
    • Constructor Detail

      • SendinblueSender

        public SendinblueSender()
    • Method Detail

      • postToSendinblue

        public void postToSendinblue​(org.keycloak.models.UserModel user,
                                     long templateId,
                                     Map<String,​String> params)
                              throws org.keycloak.email.EmailException
        Sends an email using sendinblue API.
        Parameters:
        user - recipient of the email
        templateId - ID of the template to use for the mail
        params - paramter to be replaced in the mail template
        Throws:
        org.keycloak.email.EmailException - with message from Sendinblue's ApiException (for example: 'Unauthorized' when API key is invalid or 'Not Found' when template couldn't be found.
      • setApiKey

        public SendinblueSender setApiKey​(String apiKey)
        Sets the API key and update the default client.
        Parameters:
        apiKey - api-key to use sendinblue API
        Returns:
        ths instance