Page 1 of 1

Email Notifications for all users

PostPosted:Fri May 23, 2014 10:27 am
by raquel3rs
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!

Re: Email Notifications for all users

PostPosted:Sun May 25, 2014 8:08 am
by jllort
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 ).

Re: Email Notifications for all users

PostPosted:Mon May 26, 2014 8:30 am
by raquel3rs
Thank you!

I got it working now :)

Re: Email Notifications for all users

PostPosted:Thu Aug 20, 2015 6:50 am
by richard
"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?

Re: Email Notifications for all users

PostPosted:Thu Aug 20, 2015 7:19 am
by richard
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".

Re: Email Notifications for all users

PostPosted:Fri Aug 21, 2015 10:24 am
by jllort
Adding the attribute "mail.smtp.from" has been solved your problem ?

Re: Email Notifications for all users

PostPosted:Mon Jun 13, 2016 9:43 am
by ahussain
Dears,
Could you please share the working configuration?

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

Thanks you,

Re: Email Notifications for all users

PostPosted:Thu Jun 16, 2016 4:27 pm
by jllort

Re: Email Notifications for all users

PostPosted:Thu Aug 08, 2019 2:58 pm
by Sentry
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 ?

Re: Email Notifications for all users

PostPosted:Sat Aug 10, 2019 9:02 am
by jllort
This is an old post, I suggest take a look at the new documentation https://docs.openkm.com/kcenter/view/ok ... -mail.html

Re: Email Notifications for all users

PostPosted:Mon Aug 12, 2019 8:48 am
by Sentry
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.

Re: Email Notifications for all users

PostPosted:Thu Aug 15, 2019 9:35 am
by jllort
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