Class EmailNotificationChannel
java.lang.Object
io.jmix.notifications.channel.impl.EmailNotificationChannel
- All Implemented Interfaces:
NotificationChannel
Notification channel that sends notification by email.
Uses 'Email' addon to send notifications. This channel is available only if 'Email' dependency is included into project.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Emailerprotected final List<UserEmailResolver>static final Stringprotected final UserRepository -
Constructor Summary
ConstructorsConstructorDescriptionEmailNotificationChannel(UserRepository userRepository, Emailer emailer, List<UserEmailResolver> emailResolvers) -
Method Summary
Modifier and TypeMethodDescriptiongetName()Provides unique name of channel.resolveEmail(org.springframework.security.core.userdetails.UserDetails user) booleansend(Notification notification) Sends provided notification via this notification channel.protected booleansendEmail(String email, Notification notification)
-
Field Details
-
NAME
- See Also:
-
userRepository
-
emailer
-
emailResolvers
-
-
Constructor Details
-
EmailNotificationChannel
public EmailNotificationChannel(UserRepository userRepository, Emailer emailer, List<UserEmailResolver> emailResolvers)
-
-
Method Details
-
getName
Description copied from interface:NotificationChannelProvides unique name of channel.- Specified by:
getNamein interfaceNotificationChannel- Returns:
- channel name
-
send
Description copied from interface:NotificationChannelSends provided notification via this notification channel.- Specified by:
sendin interfaceNotificationChannel- Parameters:
notification- notification- Returns:
- true if notification was successfully sent, false otherwise
-
resolveEmail
-
sendEmail
-