Email Notifications for all users

OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
raquel3rs
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: Fri May 23, 2014 10:18 am

Email Notifications for all users

Post by raquel3rs » Fri May 23, 2014 10:27 am

Hello!

I am having a problem with my email notification settings. I configured the server.xml file as follows, but I can only send email if I am in the administrator account. If another user wants to send a notification email it gives the error : " com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Client does not have permissions to send as this sender"

I know it's because in the configurations I have set in the from field the email of the admin, but I wanted to be able to send notifications from all users and not just the admin.

Code: Select all

 <Resource name="mail/OpenKM" auth="Container" type="javax.mail.Session"
                mail.transport.protocol="smtp"
                mail.smtp.auth="true"
                mail.smtp.host="mail.examlple.com"
                mail.smtp.port="587"
                mail.smtp.user="raquel"
                password="pass"
                mail.debug="true"
                mail.smtp.quitwait="false"
                mail.smtp.from="raquel@example.com"
        />
Is there a way that any user can send email notifications with their own email? or must the "from" field in the email always be the admin?

Thank you in advance!

jllort
Moderator
Moderator
Posts: 10830
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Email Notifications for all users

Post by jllort » Sun May 25, 2014 8:08 am

That's a problem with your mail server configuration that can not be solved from OpenKM side. I will try to explain. OpenKM use only one maill account to send mails, for example example@openkm.com mail account. When userX wants to send a notification openkm uses example@openkm.com account but changes the from mail field to userX@openkm.com ( or what will be ). The problem with your mail server configuration is that has a restriction that is not allowing change from field and restricts only to example@openkm.com ( you can not change the sender to UserX using the mail account ).

raquel3rs
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: Fri May 23, 2014 10:18 am

Re: Email Notifications for all users

Post by raquel3rs » Mon May 26, 2014 8:30 am

Thank you!

I got it working now :)

richard
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Thu Jul 30, 2015 2:33 am

Re: Email Notifications for all users

Post by richard » Thu Aug 20, 2015 6:50 am

"When userX wants to send a notification openkm uses example@openkm.com account but changes the from mail field to userX@openkm.com ( or what will be )."
---is there any way to avoid changing the from mail field and let it keep using the example@openkm.com?

richard
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Thu Jul 30, 2015 2:33 am

Re: Email Notifications for all users

Post by richard » Thu Aug 20, 2015 7:19 am

richard wrote:"When userX wants to send a notification openkm uses example@openkm.com account but changes the from mail field to userX@openkm.com ( or what will be )."
---is there any way to avoid changing the from mail field and let it keep using the example@openkm.com?
just fixed the sending issue, its caused by missing "mail.smtp.from" field in server.xml, the default is "mail.from".

jllort
Moderator
Moderator
Posts: 10830
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Email Notifications for all users

Post by jllort » Fri Aug 21, 2015 10:24 am

Adding the attribute "mail.smtp.from" has been solved your problem ?

ahussain
Junior Boarder
Junior Boarder
Posts: 20
Joined: Thu Jun 02, 2016 12:13 pm

Re: Email Notifications for all users

Post by ahussain » Mon Jun 13, 2016 9:43 am

Dears,
Could you please share the working configuration?

this is for self hosted mail server (not for gmail services)

Thanks you,

jllort
Moderator
Moderator
Posts: 10830
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Email Notifications for all users

Post by jllort » Thu Jun 16, 2016 4:27 pm


Sentry
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: Sun Aug 04, 2019 2:45 am

Re: Email Notifications for all users

Post by Sentry » Thu Aug 08, 2019 2:58 pm

jllort wrote:
Sun May 25, 2014 8:08 am
That's a problem with your mail server configuration that can not be solved from OpenKM side. I will try to explain. OpenKM use only one maill account to send mails, for example example@openkm.com mail account. When userX wants to send a notification openkm uses example@openkm.com account but changes the from mail field to userX@openkm.com ( or what will be ). The problem with your mail server configuration is that has a restriction that is not allowing change from field and restricts only to example@openkm.com ( you can not change the sender to UserX using the mail account ).
How to configuration the mail server ?

jllort
Moderator
Moderator
Posts: 10830
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Email Notifications for all users

Post by jllort » Sat Aug 10, 2019 9:02 am

This is an old post, I suggest take a look at the new documentation https://docs.openkm.com/kcenter/view/ok ... -mail.html

Sentry
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: Sun Aug 04, 2019 2:45 am

Re: Email Notifications for all users

Post by Sentry » Mon Aug 12, 2019 8:48 am

jllort wrote:
Sun May 25, 2014 8:08 am
That's a problem with your mail server configuration that can not be solved from OpenKM side. I will try to explain. OpenKM use only one maill account to send mails, for example example@openkm.com mail account. When userX wants to send a notification openkm uses example@openkm.com account but changes the from mail field to userX@openkm.com ( or what will be ). The problem with your mail server configuration is that has a restriction that is not allowing change from field and restricts only to example@openkm.com ( you can not change the sender to UserX using the mail account ).
Whether OpenKM support config notification all user use the configuration mail account , need not change the from field ?

Thanks in advance.

jllort
Moderator
Moderator
Posts: 10830
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Email Notifications for all users

Post by jllort » Thu Aug 15, 2019 9:35 am

It depends if your email server allow to overwrite the from field or not. If when you get this error when you try to send emails "com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Client does not have permissions to send as this sender"" then your email configuration does not support it

Post Reply