Email Config in multi site Liferay

Jose Antonio Campos Segura, modified 5 Years ago. Junior Member Posts: 45 Join Date: 9/30/17 Recent Posts
Hi.
Can someone tell me how I can configure the data of the mail server and my user, for sending emails?. My portal belongs is mounted on Liferay as more websites deployed. If I do it in server / mail settings it would affect all websites and I just want to configure the mail server for my site. Thanks.
thumbnail
Olaf Kock, modified 5 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Jose Antonio Campos Segura:


Can someone tell me how I can configure the data of the mail server and my user, for sending emails?. My portal belongs is mounted on Liferay as more websites deployed. If I do it in server / mail settings it would affect all websites and I just want to configure the mail server for my site.


Mailserver configuration is per virtual instance. Not per site. Just as user accounts are shared for the whole virtual instance.
Jose Antonio Campos Segura, modified 5 Years ago. Junior Member Posts: 45 Join Date: 9/30/17 Recent Posts
My portal is deployed on machine with Liferay that has more portals deployed. I don't know where the email account would be set up. in some .propperties file? or in some portlet?
thumbnail
Olaf Kock, modified 5 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Jose Antonio Campos Segura:

My portal is deployed on machine with Liferay that has more portals deployed. I don't know where the email account would be set up. in some .propperties file? or in some portlet?
Control Panel / Configuration / Server Administration / Mail has some.
Control Panel / Configuration / Instance Settings has a search box

That is assuming 7.2
Jose Antonio Campos Segura, modified 5 Years ago. Junior Member Posts: 45 Join Date: 9/30/17 Recent Posts
I am working with version 6.2.3.
But would that configuration it indicate affect all portals, not just mine? Is that so?
thumbnail
Olaf Kock, modified 5 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Jose Antonio Campos Segura:

I am working with version 6.2.3.
But would that configuration it indicate affect all portals, not just mine? Is that so?


I believe in 6.2 this was to be configured in either "Server Administration" or portal-ext.properties. Search for "mail" in https://docs.liferay.com/ce/portal/6.2/propertiesdoc/portal.properties.html - I don't have it running currently, so I can't check

By the way: If you stay on that version, you might at least fast-forward to bugfixes from 2.5 years later than your version: There are updates to this version available.

And with regards to "all portals": We're entering dangerous vocabulary here. It will affect all sites within the same virtual instance, yes. But that's because your user accounts don't "belong" to an individual site, but they're shared among all sites within the same virtual instance. As most installations that I see have only exactly one virtual instance, this'd be a global configuration. Yes. And it's just like expected. If you need a user database per site, you'll have to distribute your sites into individual virtual instances.
Jose Antonio Campos Segura, modified 5 Years ago. Junior Member Posts: 45 Join Date: 9/30/17 Recent Posts
Thanks Olaf, I'm going to try what you indicated
Jose Antonio Campos Segura, modified 5 Years ago. Junior Member Posts: 45 Join Date: 9/30/17 Recent Posts
hello olaf
This is my main problem, my website, it is deployed on a single instance of liferay, which hosts another 20 websites. So the portal-ext.proppertties is unique, and the configuration of the MAIL is global for all websites and this I do not need, I need to configure my server and email account independently of the other websites, which use their own. Thanks.
thumbnail
Christoph Rabel, modified 5 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
Maybe you should open a feature request for that. There were several questions about multi-mailserver support in the last couple of weeks.
But currently, that isn't supported. Liferay only allows you to enter one smtp server and it will always use that single server. The workaround I would choose would be to use my own mailserver and dispatch from there. e.g. if your Liferay is on a Linux box, install postfix or some other MTA. It should be possible to configure it to dispatch mails according to some rules (e.g. sender email).
Otherwise you would need to create an ext plugin and overwrite the mail implementation of Liferay to use multiple configurations.
Jose Antonio Campos Segura, modified 5 Years ago. Junior Member Posts: 45 Join Date: 9/30/17 Recent Posts
On other websites, which are hosted on liferay, they have a portlet, intended for the configuration of sending mails. To use it as a contact form, I can develop it, but I don't know how I can use it for sending user registration mail, sending passwords, etc.