Created
October 7, 2013 21:11
-
-
Save amusarra/6875020 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SubscriptionSender subscriptionSender = new SubscriptionSender(); | |
| subscriptionSender.setSubject("Lista degli utenti disattivati"); | |
| subscriptionSender.setBody(emailBody.toString()); | |
| subscriptionSender.setUserId(user.getUserId()); | |
| subscriptionSender.setCompanyId(user.getCompanyId()); | |
| subscriptionSender.setFrom("noreply@liferay.com", "Liferay Portal"); | |
| subscriptionSender.setHtmlFormat(false); | |
| subscriptionSender.setMailId("user", user.getUserId()); | |
| subscriptionSender.addRuntimeSubscribers( | |
| user.getEmailAddress(), | |
| user.getFullName()); | |
| List<EmailAddress> emails = (List<EmailAddress>) user.getEmailAddresses(); | |
| if (emails.size() > 0) { | |
| if (_log.isInfoEnabled()) { | |
| _log.info("User " + user.getUserId() + | |
| " has additional emails address"); | |
| } | |
| for (EmailAddress emailAddress : emails) { | |
| subscriptionSender.addRuntimeSubscribers( | |
| emailAddress.getAddress(), | |
| (String) user.getFullName()); | |
| } | |
| } | |
| subscriptionSender.flushNotificationsAsync(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment