import javax.ejb.EJB;
import javax.ejb.EJBException;
import javax.ejb.Stateless;
-import javax.mail.Address;
-import javax.mail.internet.AddressException;
-import javax.mail.internet.InternetAddress;
import javax.persistence.NoResultException;
import javax.persistence.PersistenceException;
import javax.persistence.Query;
// Update user account
User updatedUser = this.updateUserData(user);
- // Init variable
- Address emailAddress;
-
- try {
- // Create email address and set
- emailAddress = new InternetAddress(updatedUser.getUserContact().getContactEmailAddress());
- } catch (final AddressException ex) {
- // Throw again
- throw new EJBException(ex);
- }
-
// Send out email
- this.sendEmail("User account confirmed", "user_account_confirmed", emailAddress, updatedUser, baseUrl, null); //NOI18N
+ this.sendEmail("User account confirmed", "user_account_confirmed", updatedUser, baseUrl, null); //NOI18N
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.confirmAccount: updatedUser={1} - EXIT!", this.getClass().getSimpleName(), updatedUser)); //NOI18N
// Flush it to get id number back
this.getEntityManager().flush();
- // Init variable
- Address emailAddress;
-
- try {
- // Create email address and set
- emailAddress = new InternetAddress(updatedUser.getUserContact().getContactEmailAddress());
- } catch (final AddressException ex) {
- // Throw again
- throw new EJBException(ex);
- }
-
// Send email to user
- this.sendEmail("User password change", "user_password_change", emailAddress, user, baseUrl, null); //NOI18N
+ this.sendEmail("User password change", "user_password_change", user, baseUrl, null); //NOI18N
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: entry.userPasswordHistoryId={1} - EXIT!", this.getClass().getSimpleName(), entry.getUserPasswordHistoryId())); //NOI18N