Foren

Announcement portal

thumbnail
Hamish Campbell, geändert vor 14 Jahren.

Announcement portal

New Member Beiträge: 21 Beitrittsdatum: 31.01.09 Neueste Beiträge
We have been struggling for a week to get the announcement portal changed from publishing to web page to sending a e-mail to user groups. Cant find any info on the forums and wiki can any one help?

* existing users
* new users

Hamish
thumbnail
Lisa Simpson, geändert vor 14 Jahren.

RE: Announcement portal

Liferay Legend Beiträge: 2034 Beitrittsdatum: 05.03.09 Neueste Beiträge
I would suggest that you not use the Announcement Portal. Consider instead using something that already sends email - like the message boards.
thumbnail
Hamish Campbell, geändert vor 14 Jahren.

RE: Announcement portal

New Member Beiträge: 21 Beitrittsdatum: 31.01.09 Neueste Beiträge
Have looked at this a lot, the problem is that we need the user grouping and roles grouping that the Announcement portal offers - it is the correct tool for the job - I just cant work out why we cant change the default from user page notification to e-mail?!

We will be setting up lots of groups based on user roles, we need a way to message them... this must be simple (: the is an option to use e-mail in the GUI why cant we just change the defult so that it works!!! A frustrated user - though still very happy to be using liferay as am involved in choosing the new CMS for indymedia UK project and this is based on drupal which has a frighteningly opaque/un-friendly UI for producers.
thumbnail
Lisa Simpson, geändert vor 14 Jahren.

RE: Announcement portal

Liferay Legend Beiträge: 2034 Beitrittsdatum: 05.03.09 Neueste Beiträge
Might it not be easier to subscribe a User Group or Role to a thread on the message board? Just an idea....
thumbnail
Manuel Achatz, geändert vor 14 Jahren.

RE: Announcement portal

Junior Member Beiträge: 45 Beitrittsdatum: 16.01.09 Neueste Beiträge
Hey,

i've got the same problem and no solution yet.
I've got about 600 different user groups, spread over 30 communities with different access rights.
What i need: Send emails to all members of a specified community, like in the distribution scope ability of the announcements.
What we try to do: Stop sending email newsletter, instead post the newsletter in a blog and let the user know there is a new one.

The forums aren't that good for this. The other possibility would be an email subscrition to the blogs portlet. Unfortunately there is only a rss subscription. Due to private communities, this doesn't perform really well.

Regards
Manuel
thumbnail
Hamish Campbell, geändert vor 14 Jahren.

RE: Announcement portal

New Member Beiträge: 21 Beitrittsdatum: 31.01.09 Neueste Beiträge
Manuel, thanks for the feedback.

It is very frustrating not to get a simple answer to why the alert/announcement portal cant do something as simple as send a e-mail.

THE MUST be a simple way to have a default message as e-mail and then use this portal to send e-mails to groups of users.

If its broken, when is it getting fixed?

Hamish
thumbnail
Mahdy Khayyamian, geändert vor 14 Jahren.

RE: Announcement portal

New Member Beiträge: 10 Beitrittsdatum: 02.05.09 Neueste Beiträge
Hi Hamish!

I had the same frustrating problem with sending email through announcements, but eventually I succeeded to solve it. The problem might have a variety of reasons, and I will mention those I came across. Note that I am working on liferay 5.2.2 source code.

1) Make sure your smtp is configured properly in portal.properties file. It's pretty easy and you may find this link helpful for smtp configuration.
sample smtp config for gmail

2) Configure Announcement portlet email settings in portal.properties file as follows.

    announcements.email.from.name=IIN Technical group
    announcements.email.from.address=somebody@gmail.com

    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

The key part is the from address which has to be an email on your configured smtp server.

3) Make sure the receiver of your announcement is configured to receive email notifications. It can be set on the liferay portal here: UserAccount/Miscellaneous/Announcement.

4) Note that emails are sent based upon the display date of the sender's time zone. If your time zone is different from the application server time zone emails would be scheduled to deliver in the appropriate time when your server might be actually down. A user time zone can be changed in Liferay portal here: UserAccount/Miscellaneous/Display Setting.

5) Announcement portlet has also a small bug in sending emails to Community/Organization roles which I have resolved by a slight code modification, but I don't think this problem exists with UserGroups. If the above notes didn't help, and you think a code modification is needed in your case, feel free to let me know.
thumbnail
Brian Ko, geändert vor 14 Jahren.

RE: Announcement portal

Junior Member Beiträge: 70 Beitrittsdatum: 11.02.10 Neueste Beiträge
I am trying to do the same thing with 5.2.3. I followed all the step you described. The difference are
1. I am using Lotus notes email server.
2. I could not find following 2 entries in portal.ext.properties of 5.2.3.
mail.session.mail.smtp.starttls.enable=true
mail.session.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory

Everything else is same and it still does not work. (When I use gmail account on port 465, I had a connection problem.) Any suggestion on my problem will be of help.

By the way, when is the email supposed to be sent? When a announcement is created?
Thank you for your help.

Brian Ko
thumbnail
Mahdy Khayyamian, geändert vor 14 Jahren.

RE: Announcement portal

New Member Beiträge: 10 Beitrittsdatum: 02.05.09 Neueste Beiträge
Maybe this link helps for smtp configuration on 5.2.3. Refer to the 4th point of my last post about when announcement emails are sent.
thumbnail
Brian Ko, geändert vor 13 Jahren.

RE: Announcement portal

Junior Member Beiträge: 70 Beitrittsdatum: 11.02.10 Neueste Beiträge
I fixed the problem by removing the option to authenticate by following.

mail.session.mail.smtp.auth=false
The problem may be related with our lotus notes set up.
thumbnail
Ivano Carrara, geändert vor 13 Jahren.

RE: Announcement portal

Expert Beiträge: 345 Beitrittsdatum: 03.07.05 Neueste Beiträge
Hi Mahdy, I have exactly the problem you addressed here:

5) Announcement portlet has also a small bug in sending emails to Community/Organization roles which I have resolved by a slight code modification ... ... if you think a code modification is needed in your case, feel free to let me know.


I'm using the 6.0.5 version ... Please, could you give me your solution ?

Thank you very much in advance !

Ivano
thumbnail
Mahdy Khayyamian, geändert vor 13 Jahren.

RE: Announcement portal

New Member Beiträge: 10 Beitrittsdatum: 02.05.09 Neueste Beiträge
The problem is that users pertaining to a Organization/Community role is mistakenly read from a UserRole table while it must be retrieved from UserGroupRole table. So what you have to do is changing AnnouncementEntryLocalServiceImpl class and more precisely the notifyUser() method. I bring here part of this method between "altered by Rose System" comments here (lines 10-23):


		else if (className.equals(Organization.class.getName())) {
				Organization organization =
					organizationPersistence.findByPrimaryKey(classPK);

				toName = organization.getName();

				params.put("usersOrgs", classPK);
			}
			//altered By Rose System
			else if (className.equals(Role.class.getName()) && RoleUtil.findByPrimaryKey(classPK).getType() == 1 )  {
				Role role = rolePersistence.findByPrimaryKey(classPK);

				toName = role.getName();

				params.put("usersRoles", classPK);
			}
			else if (className.equals(Role.class.getName()) && RoleUtil.findByPrimaryKey(classPK).getType() != 1){
				Role role = rolePersistence.findByPrimaryKey(classPK);
				toName = role.getName();
				params.put("userGroupRole2", classPK);
			}
			//altered by Rose System
			else if (className.equals(UserGroup.class.getName())) {
				UserGroup userGroup = userGroupPersistence.findByPrimaryKey(
					classPK);

				toName = userGroup.getName();

				params.put("usersUserGroups", classPK);
			}




You also have to change getWhere and getJoing methods of UserFinderImpl class. here is the
getWhere change (lines 6-10):



		else if (key.equals("usersRoles")) {
			join = CustomSQLUtil.get(JOIN_BY_USERS_ROLES);
		}
		//altered by Rose System
		else if (key.equals("userGroupRole2")) {
			join = CustomSQLUtil.get(JOIN_BY_USER_GROUP_ROLE_2);
		}
		//altered by Rose System
		else if (key.equals("usersUserGroups")) {
			join = CustomSQLUtil.get(JOIN_BY_USERS_USER_GROUPS);
		}



BTW, don't forget to define JOIN_BY_USER_GROUP_ROLE_2 variable in the class.

here is also the slight modification of getJoin (lines 5-9):


		else if (key.equals("userGroupRole")) {
			join = CustomSQLUtil.get(JOIN_BY_USER_GROUP_ROLE);
		}
		//rose system
		else if (key.equals("userGroupRole2")) {
			join = CustomSQLUtil.get(JOIN_BY_USER_GROUP_ROLE_2);
		}
		//rose system
		else if (key.equals("usersGroups")) {
			join = CustomSQLUtil.get(JOIN_BY_USERS_GROUPS);
		}



you also have to add the new query to portal.xml as follows:



	<sql id="com.liferay.portal.service.persistence.UserFinder.joinByUserGroupRole2">
		
			INNER JOIN
				UserGroupRole ON
					(UserGroupRole.userId = User_.userId)
			WHERE
				(UserGroupRole.roleId = ?)
		
	</sql>



As you see this query uses UserGroupRole to retrieve the users of a community/organization
role.

I hope this helps.
thumbnail
Corentin R, geändert vor 13 Jahren.

RE: Announcement portal

Junior Member Beiträge: 92 Beitrittsdatum: 18.06.10 Neueste Beiträge
Nice solution Mahdy, you saved me a lot of time !
Thank you for sharing !
Manohar Reddy, geändert vor 8 Jahren.

RE: Announcement portal

Junior Member Beiträge: 48 Beitrittsdatum: 07.08.14 Neueste Beiträge
Hi,

I am facing a problem in announcements to sending a Email notification to organization users . I am using Liferay 6.2 GA2 . I configured announcements notification in MyAccount settings.
Configure Announcement portlet email settings in portal.properties file as follows.
announcements.email.from.name=VIdyayug 
     announcements.email.from.address=admin@vidyayug.com
 
     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
     announcements.entry.check.interval=1
.

Actually I didn't understand when the CheckEntryMessageListener will calls on which event raising time . Sending Email notification code executes from this listener onwards.
Please help me.
s t, geändert vor 13 Jahren.

RE: Announcement portal

Junior Member Beiträge: 48 Beitrittsdatum: 19.10.10 Neueste Beiträge
Hi Mahdy,

would you mind posting your workaround for Orgs and Communities.

I'm running on 6.0.5 and still have the problem that no emails are sent, not even when sending to user groups.
However, emails are sent to announcements.email.to.address, if set. So I assume email settings are correct.

Thanks for your help.
s t
thumbnail
Mahdy Khayyamian, geändert vor 13 Jahren.

RE: Announcement portal

New Member Beiträge: 10 Beitrittsdatum: 02.05.09 Neueste Beiträge
My workaround merely solves the problem of sending emails to "Organization Roles" or maybe similar problems. I doubt your problem is the same as mine. Please test if you can send email to users of a particular "portal role" such as Administrators or Power Users, if this is OK, then your problem is probably like mine and I will tell you exactly what to do.