AnsweredAssumed Answered

GEL Script for email gets SMTP error

Question asked by MikeNaputano on Oct 20, 2011
Latest reply on Oct 21, 2011 by MikeNaputano
Hey everyone,
I am new to Clarity and very new to GEL scripting. I am trying to send an email from a GEL script, and I saw some good posts out here that showed a basic email script. I copied and pasted the script into an action item and added in my particular parameters for the email server, addresses to send to, etc. I keep getting an error: BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:15:21: <mail:email> Could not connect to SMTP host: ucs.psu.edu, port: 25 at org.apache.commons.jelly.tags.email.EmailTag.doTag(EmailTag.java:268)
The error is much longer than this, but basically I can see right away it is trying to hit my email server at port 25. I need it to go to port 443. I tried to put the port in the emailServer value, but it does not attempt that port. I cannot seem to find any documentation on how to make that setting in the GEL script. Here is what my script looks like currently:
<gel:script
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:jelly="jelly:core"
xmlns:mail="jelly:email">

<!-- email vars -->
<jelly:set var="emailFrom" value="mjn10@psu.edu" />
<jelly:set var="emailServer" value="ucs.psu.edu:443" />

<!-- send it -->
<mail:email
server="${emailServer}"
from="${emailFrom}"
to="jme1@psu.edu"
subject="Hello">
Hello Judy!!!
</mail:email>

</gel:script>

We are using CA Clarity 12.1.0.5840 which is being hosted by CA SaaS.

Thank you in advance!
Mike

Outcomes