PPM: How to send email by using GEL script?

book

Article ID: 17147

calendar_today

Updated On:

Products

CLARITY PPM FOR ITG CLARITY PPM FEDERAL Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction



How to send email by using Gel script?
Need to use "CC" for email. Is there any sample code?

 

Environment

PPM 15.2PPM 15.3

Resolution

There are 2 ways to send email by GEL script.

One is the usage of GEL Tag library and other is the usage of jelly library.

Case of GEL Tag library, it requires HTML mail format.

Case of jelly library, it requires plane text mail format. 

 

Sample GEL code with GEL Tag library: (HTML mail format)

<gel:script 

    xmlns:core="jelly:core"

    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary">

    <gel:email 

from="[email protected]

to="[email protected]

subject="Sample Email">

<![CDATA[ 

<html> 

<header></header> 

<body> 

<p>This is test email.<br></p> 

</body> 

</html>         

       ]]>  

    </gel:email>

</gel:script>

 

 

Sample GEL code with jelly library: plane text mail format (CC option are enabled)

 

<gel:script 

    xmlns:core="jelly:core"

    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"

    xmlns:email="jelly:email">

    <email:email 

                server="xxxxxxxxx"

                from="[email protected]

                to="[email protected]

                CC="[email protected]"

                subject="Sample email">

                    This is test email.

    </email:email>

</gel:script>

 

Additional Information

NOTE:
1)  When using <gel:email> tag it DOES NOT work if a space is present between email id's. 
      Example:  to="[email protected]; [email protected]"  

2) But with <email:email> tag it works even if there is a space between email id's.