© Michael Müller 2018
Michael MüllerPractical JSF in Java EE 8 https://doi.org/10.1007/978-1-4842-3030-5_30

30. Activation Mail

Michael Müller1 
(1)
Brühl, Nordrhein-Westfalen, Germany
 

In Alumni, once the Account is created, we send an activation mail to the user, which contains a link with a universally unique identifier (UUID) . If the user follows this link, the account will be activated and become ready for use.

Config Mail Properties by Code

The sending of the email is performed by an application scoped class called the Mailer. Within this class, some hardcoded properties are collected into a map. In the final version, a JavaMail session will be our choice to retrieve the config from (see the next section).

01   @Dependent
02   public class Mailer ...

Get Practical JSF in Java EE 8: Web Applications ​in Java for the Enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.