Email notification not working for one or more GEL Processes in Clarity
search cancel

Email notification not working for one or more GEL Processes in Clarity

book

Article ID: 135852

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

  • Email notifications are not working for one ore more custom GEL processes.
  • I checked to make sure the emails are not going into a spam/junk folder. 

Environment

Release : All Supported Releases

Cause

  • One known causes is an email address is hard coded in the GEL as the email sender address.
  • It's recommended to instead point to the properties file to avoid any issues including if the email address changes, or any other changes related to SMTP / emails

Resolution

Check the GEL script to make sure the GEL pulls from the SMTP host from the properties file.

Example of Sample Gel Script 

 

<core:invokeStatic className="java.lang.System" method="getenv" var="NIKU_HOME">

        <core:arg value="NIKU_HOME"/>

    </core:invokeStatic>

    <gel:parse file="${NIKU_HOME}/config/properties.xml" var="properties"/>

    <gel:set asString="true" select="$properties//mailServer/@host" var="SMTPServerHost"/>

<gel:set asString="true" var="SMTPServer" select="$properties//mailServer/@host"/> 

 

  <gel:log> SMTPServer : ${SMTPServer}</gel:log>   < -- This will display the mail host value that is configured in the properties.xml  in the process log, and was very helpful during troubleshooting  

 

<!-- Initiate a new java mail session -->

<core:new className="java.util.Properties" var="props" />

<core:set value="${props.put('mail.transport.protocol', 'smtp')}" var="void" />

<core:set value="${props.put('mail.smtp.host', SMTPServer)}" var="void" />

<core:set value="${props.put('mail.smtp.auth', 'false)}" var="void" />