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
Modifier and TypeFieldDescriptionprotected final Emailer
protected final List<UserEmailResolver>
static final String
protected final UserRepository
-
Constructor Summary
ConstructorDescriptionEmailNotificationChannel
(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) boolean
send
(Notification notification) Sends provided notification via this notification channel.protected boolean
sendEmail
(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:NotificationChannel
Provides unique name of channel.- Specified by:
getName
in interfaceNotificationChannel
- Returns:
- channel name
-
send
Description copied from interface:NotificationChannel
Sends provided notification via this notification channel.- Specified by:
send
in interfaceNotificationChannel
- Parameters:
notification
- notification- Returns:
- true if notification was successfully sent, false otherwise
-
resolveEmail
-
sendEmail
-