Foren
Workflow email notification from no-reply@liferay.com
Gaurav Joshi, geändert vor 8 Jahren.
Workflow email notification from no-reply@liferay.com
New Member Beiträge: 8 Beitrittsdatum: 14.04.14 Neueste Beiträge
Hi
I want to change notification received from "no-reply@liferay.com" to my domain email.
The from address for email notification on "denied" and "granted" is ok but on "added", "reviewed" and "updated" it is giving from address as "no-reply@liferay.com".
How to change this behavior?
I want to change notification received from "no-reply@liferay.com" to my domain email.
The from address for email notification on "denied" and "granted" is ok but on "added", "reviewed" and "updated" it is giving from address as "no-reply@liferay.com".
How to change this behavior?
Vishal Kumar, geändert vor 8 Jahren.
RE: Workflow email notification from no-reply@liferay.com
Regular Member Beiträge: 198 Beitrittsdatum: 12.12.12 Neueste Beiträge
May This help You.
// You can specify the sender in the workflow context (default sender: "'Liferay Portal Workflow Notifications [no-reply@liferay.com]'")
HashMap<String, Object> workflowContext = new HashMap<String, Object>();
workflowContext.put(
WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS,
"no-reply@yourdomain.com");
workflowContext.put(
WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME,
"Automated Notification Mailer");
serviceContext.setAttribute("workflowContext", workflowContext);
see below link also
http://www.liferay.com/de/community/wiki/-/wiki/Main/Workflow+Definition#section-Workflow+Definition-Task+-+Action+%28Notifications%29
It is answer of your question?
Regards,
Vishal
// You can specify the sender in the workflow context (default sender: "'Liferay Portal Workflow Notifications [no-reply@liferay.com]'")
HashMap<String, Object> workflowContext = new HashMap<String, Object>();
workflowContext.put(
WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS,
"no-reply@yourdomain.com");
workflowContext.put(
WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME,
"Automated Notification Mailer");
serviceContext.setAttribute("workflowContext", workflowContext);
see below link also
http://www.liferay.com/de/community/wiki/-/wiki/Main/Workflow+Definition#section-Workflow+Definition-Task+-+Action+%28Notifications%29
It is answer of your question?
Regards,
Vishal
André Luís Ribeiro Didier, geändert vor 7 Jahren.
RE: Workflow email notification from no-reply@liferay.com
New Member Beiträge: 5 Beitrittsdatum: 04.05.16 Neueste BeiträgeVishal Kumar:
May This help You.
// You can specify the sender in the workflow context (default sender: "'Liferay Portal Workflow Notifications [no-reply@liferay.com]'")
HashMap<String, Object> workflowContext = new HashMap<String, Object>();
workflowContext.put(
WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS,
"no-reply@yourdomain.com");
workflowContext.put(
WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME,
"Automated Notification Mailer");
serviceContext.setAttribute("workflowContext", workflowContext);
see below link also
http://www.liferay.com/de/community/wiki/-/wiki/Main/Workflow+Definition#section-Workflow+Definition-Task+-+Action+%28Notifications%29
It is answer of your question?
Regards,
Vishal
I did as shown here. The sender name is ok, but the e-mail is still the one set in the portal instance (Control Panel / Configuration / Mail notification / Sender). Does the portal configuration override the workflowContext property?
Chris Taylor, geändert vor 6 Jahren.
RE: Workflow email notification from no-reply@liferay.com
New Member Beiträge: 2 Beitrittsdatum: 05.11.15 Neueste Beiträge
I am curious where you placed the above code? Was this in a Groovy script in your workflow definition XML, or was this Java code in the WorkflowHandler component? Or someplace else?
André Luís Ribeiro Didier, geändert vor 6 Jahren.
RE: Workflow email notification from no-reply@liferay.com
New Member Beiträge: 5 Beitrittsdatum: 04.05.16 Neueste BeiträgeChris Taylor:
I am curious where you placed the above code? Was this in a Groovy script in your workflow definition XML, or was this Java code in the WorkflowHandler component? Or someplace else?
As a Groovy script in the workflow definition XML.
David H Nebinger, geändert vor 8 Jahren.
RE: Workflow email notification from no-reply@liferay.com
Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
That's the default value assigned in kaleo-web/WEB-INF/classes/META-INF/kaleo-spring.xml:
I would actually recommend opening a jira ticket to make this a property-based value. Why Liferay would think that it's okay to hard-code their own email address into any of the plugins is just beyond me.
Second, you could edit the kaleo-spring.xml file to use your own default. You'll have to restart the container but it will stick.
Or you could use Vishal's suggestion, but that's typically for a one-off sort of scenario. If your workflow designers forget to set the value, well then no-reply@liferay.com will be back to haunt you.
<bean class="com.liferay.portal.workflow.kaleo.runtime.notification.EmailNotificationSender">
<property name="fromAddress" value="no-reply@liferay.com" />
<property name="fromName" value="Liferay Portal Workflow Notifications" />
</bean>
I would actually recommend opening a jira ticket to make this a property-based value. Why Liferay would think that it's okay to hard-code their own email address into any of the plugins is just beyond me.
Second, you could edit the kaleo-spring.xml file to use your own default. You'll have to restart the container but it will stick.
Or you could use Vishal's suggestion, but that's typically for a one-off sort of scenario. If your workflow designers forget to set the value, well then no-reply@liferay.com will be back to haunt you.
Juan Gonzalez, geändert vor 8 Jahren.
RE: Workflow email notification from no-reply@liferay.com
Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Hi Gauray,
I remember achieving this some years ago thanks to a script in a workflow XML file. Investigate that approach.
I remember achieving this some years ago thanks to a script in a workflow XML file. Investigate that approach.
Shailesh Walke, geändert vor 8 Jahren.
RE: Workflow email notification from no-reply@liferay.com
New Member Beitrag: 1 Beitrittsdatum: 19.11.14 Neueste Beiträge
Hi,
I am also facing same problem. Mails are not always coming from no-reply@liferay.com. Mails are coming from test@liferay.com on approval granted and denied which is configured in Content ->Configuration and content of mail is picked up from template; but all other times like content reviewed or content added its coming from no-reply@liferay.com and content of mail is picked up from worklow xml file. I am using liferay default workflow on Liferayray 6.2 EE version. Why it behave different for approval granted, denied and content added, reviewed ?
I am also facing same problem. Mails are not always coming from no-reply@liferay.com. Mails are coming from test@liferay.com on approval granted and denied which is configured in Content ->Configuration and content of mail is picked up from template; but all other times like content reviewed or content added its coming from no-reply@liferay.com and content of mail is picked up from worklow xml file. I am using liferay default workflow on Liferayray 6.2 EE version. Why it behave different for approval granted, denied and content added, reviewed ?
Aldo De Vleeschauwer, geändert vor 8 Jahren.
RE: Workflow email notification from no-reply@liferay.com
Junior Member Beiträge: 35 Beitrittsdatum: 09.03.11 Neueste Beiträge
This works on LR 6.1: add following code in the Workflow xml definition, in an action before the notification.
...
<action>
<name>setNotificationStuff</name>
<script>
<![CDATA[
// Set mail stuff here in Javascript
workflowContext.put(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_ADDRESS,"no-reply@acme.be");
workflowContext.put(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.CONTEXT_NOTIFICATION_SENDER_NAME,"Acme Automated Notification");
]]>
</script>
<script-language>javascript</script-language>
<execution-type>onEntry</execution-type>
</action>
<notification>
<name>Content Review Notification</name>
...</notification>