org.keycloak.email

## Class DefaultEmailSenderProvider

- java.lang.Object
- - org.keycloak.email.DefaultEmailSenderProvider

- All Implemented Interfaces:
    EmailSenderProvider, Provider

      public class DefaultEmailSenderProvider
      extends Object
      implements EmailSenderProvider

  Author:
    Stian Thorgersen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultEmailSenderProvider(KeycloakSession session)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `protected String` | `retrieveEmailAddress(UserModel user)`
    `void` | `send(Map<String,String> config, UserModel user, String subject, String textBody, String htmlBody)`
    `protected javax.mail.internet.InternetAddress` | `toInternetAddress(String email, String displayName)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultEmailSenderProvider

          public DefaultEmailSenderProvider(KeycloakSession session)

  - ### Method Detail

    - #### send

          public void send(Map<String,String> config,
                           UserModel user,
                           String subject,
                           String textBody,
                           String htmlBody)
                    throws EmailException

      Specified by:
        `send` in interface `EmailSenderProvider`
      Throws:
        `EmailException`

    - #### toInternetAddress

          protected javax.mail.internet.InternetAddress toInternetAddress(String email,
                                                                          String displayName)
                                                                   throws UnsupportedEncodingException,
                                                                          javax.mail.internet.AddressException,
                                                                          EmailException

      Throws:
        `UnsupportedEncodingException`
        `javax.mail.internet.AddressException`
        `EmailException`

    - #### retrieveEmailAddress

          protected String retrieveEmailAddress(UserModel user)

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

Copyright © 2020 JBoss by Red Hat. All rights reserved.