Liferay Symposium 2016 | Reserve your seat today.
1. Installation / Deployment / Setup
(Opens New Window)
Mark as an Answer
How to configure different mail settings for different portal instances?
September 4, 2011 8:23 AM
Rank: New Member
Join Date: September 3, 2011
I'd like to set up a portal instance (on an existing liferay installation) for a new customer. Now I wonder if it is possible to make the portal send it's own messages such as registration welcome mail and password reset mail using a specific mailbox. The idea is to use a mailbox where the customer has access to the mailing history of the portal through his normal mail client. However, in the control panel I can only configure one mail connection applicable to all portal instances of the same installation. It would be nice to be able to override the mail settings in an instance's control panel or use the main instance's settings by default.
I could not figure out how to achieve this with include-and-override properties besides the fact, that this would not serve usability requirements very well. I actually think it is not possible to configure it with properties at all because it simply does not work. The values get loaded once at portal startup in PropsValues.java, example:
public static final String MAIL_SESSION_MAIL_TRANSPORT_PROTOCOL = PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_TRANSPORT_PROTOCOL);
In the moment, above line gets executed, the company id is not yet known and as far as I understand a different portal instance does not involve a different classloader to reload PropsValues class again so the values are as final as declared no matter if I configure instance specific properties or not.
Any suggestions very much appreciated.
Sign in to vote.
Please sign in to flag this as inappropriate.