Forums de discussion

System Property for Announcement email notification enablement

Sourabh Lonikar, modifié il y a 7 années.

System Property for Announcement email notification enablement

Junior Member Publications: 42 Date d'inscription: 14/11/16 Publications récentes
Hi everyone,
We are looking into requirement for enabling email notifications for users. Is Liferay having some property which enables us to enable "email" property in User Accounts (DB table : announcementsdelivery ) to be set upon new user creation ?

Or else I will have to go with hook by modifying UserLocalServiceImpl.java

Regards,
Sourabh
thumbnail
David H Nebinger, modifié il y a 7 années.

RE: System Property for Announcement email notification enablement

Liferay Legend Publications: 14918 Date d'inscription: 02/09/06 Publications récentes
This is enabled by default, check the admin.email.user.added.enabled property.

This has absolutely nothing to do with the announcements delivery stuff. And note that you should not be in the database, that is not yours to poke around in, stay out of it because it will just lead you astray.
Sourabh Lonikar, modifié il y a 7 années.

RE: System Property for Announcement email notification enablement

Junior Member Publications: 42 Date d'inscription: 14/11/16 Publications récentes
Hi David,
I am referring to announcement notification email channel (Dockbar > My Account > Announcement > email, sms, web).

The web option is enabled by default for all users. Similarly, can we have email option enabled for new user during user creation (DB table : announcementsdelivery ) ?

If not, I will need to create hook for same.

As of now, I have found only below properties from portal.properties file for announcement:

##
## Announcements Portlet
##

#
# Configure email notification settings.
#
announcements.email.from.name=
announcements.email.from.address=

announcements.email.to.name=
announcements.email.to.address=noreply@liferay.com

announcements.email.subject=com/liferay/portlet/announcements/dependencies/email_subject.tmpl
announcements.email.body=com/liferay/portlet/announcements/dependencies/email_body.tmpl

#
# Set the list of announcement types. The display text of each of the
# announcement types is set in content/Language.properties.
#
announcements.entry.types=general,news,test

#
# Set the interval in minutes on how often CheckEntryMessageListener will
# run to check for new announcements. Users will be notified via email of
# new announcements.
#
announcements.entry.check.interval=15

#
# Set the available values for the number of announcements to display per
# page.
#
announcements.entry.page.delta.values=5,10,20,30,50,75


Regards,
Sourabh
thumbnail
David H Nebinger, modifié il y a 7 années.

RE: System Property for Announcement email notification enablement (Réponse)

Liferay Legend Publications: 14918 Date d'inscription: 02/09/06 Publications récentes
Sourabh Lonikar:
The web option is enabled by default for all users. Similarly, can we have email option enabled for new user during user creation (DB table : announcementsdelivery ) ?


Just create a User ModelListener implementation so you can implement the onAfterCreate() method, then you can add the AnnouncementsDelivery using the AD local or remote service.