Package org.keycloak.email
Interface EmailTemplateProvider
- 
- All Superinterfaces:
- Provider
 - All Known Implementing Classes:
- FreeMarkerEmailTemplateProvider
 
 public interface EmailTemplateProvider extends Provider - Author:
- Stian Thorgersen
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringIDENTITY_PROVIDER_BROKER_CONTEXT
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsend(String subjectFormatKey, String bodyTemplate, Map<String,Object> bodyAttributes)Send formatted emailvoidsend(String subjectFormatKey, List<Object> subjectAttributes, String bodyTemplate, Map<String,Object> bodyAttributes)Send formatted emailvoidsendConfirmIdentityBrokerLink(String link, long expirationInMinutes)Send to confirm that user wants to link his account with identity broker linkvoidsendEmailUpdateConfirmation(String link, long expirationInMinutes, String address)voidsendEvent(Event event)voidsendExecuteActions(String link, long expirationInMinutes)Change password email requested by adminvoidsendPasswordReset(String link, long expirationInMinutes)Reset password sent from forgot password link on loginvoidsendSmtpTestEmail(Map<String,String> config, UserModel user)Test SMTP connection with current logged in uservoidsendVerifyEmail(String link, long expirationInMinutes)EmailTemplateProvidersetAttribute(String name, Object value)EmailTemplateProvidersetAuthenticationSession(AuthenticationSessionModel authenticationSession)EmailTemplateProvidersetRealm(RealmModel realm)EmailTemplateProvidersetUser(UserModel user)
 
- 
- 
- 
Field Detail- 
IDENTITY_PROVIDER_BROKER_CONTEXTstatic final String IDENTITY_PROVIDER_BROKER_CONTEXT - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setAuthenticationSessionEmailTemplateProvider setAuthenticationSession(AuthenticationSessionModel authenticationSession) 
 - 
setRealmEmailTemplateProvider setRealm(RealmModel realm) 
 - 
setUserEmailTemplateProvider setUser(UserModel user) 
 - 
setAttributeEmailTemplateProvider setAttribute(String name, Object value) 
 - 
sendEventvoid sendEvent(Event event) throws EmailException - Throws:
- EmailException
 
 - 
sendPasswordResetvoid sendPasswordReset(String link, long expirationInMinutes) throws EmailException Reset password sent from forgot password link on login- Parameters:
- link-
- expirationInMinutes-
- Throws:
- EmailException
 
 - 
sendSmtpTestEmailvoid sendSmtpTestEmail(Map<String,String> config, UserModel user) throws EmailException Test SMTP connection with current logged in user- Parameters:
- config- SMTP server configuration
- user- SMTP recipient
- Throws:
- EmailException
 
 - 
sendConfirmIdentityBrokerLinkvoid sendConfirmIdentityBrokerLink(String link, long expirationInMinutes) throws EmailException Send to confirm that user wants to link his account with identity broker link- Throws:
- EmailException
 
 - 
sendExecuteActionsvoid sendExecuteActions(String link, long expirationInMinutes) throws EmailException Change password email requested by admin- Parameters:
- link-
- expirationInMinutes-
- Throws:
- EmailException
 
 - 
sendVerifyEmailvoid sendVerifyEmail(String link, long expirationInMinutes) throws EmailException - Throws:
- EmailException
 
 - 
sendEmailUpdateConfirmationvoid sendEmailUpdateConfirmation(String link, long expirationInMinutes, String address) throws EmailException - Throws:
- EmailException
 
 - 
sendvoid send(String subjectFormatKey, String bodyTemplate, Map<String,Object> bodyAttributes) throws EmailException Send formatted email- Parameters:
- subjectFormatKey- message property that will be used to format email subject
- bodyTemplate- freemarker template file
- bodyAttributes- attributes used to fill template
- Throws:
- EmailException
 
 - 
sendvoid send(String subjectFormatKey, List<Object> subjectAttributes, String bodyTemplate, Map<String,Object> bodyAttributes) throws EmailException Send formatted email- Parameters:
- subjectFormatKey- message property that will be used to format email subject
- subjectAttributes- attributes used to fill subject format message
- bodyTemplate- freemarker template file
- bodyAttributes- attributes used to fill template
- Throws:
- EmailException
 
 
- 
 
-