ca.portal.admin

Gel script : mail sending not working anymore

Discussion created by ca.portal.admin on Oct 12, 2010
Latest reply on Aug 25, 2016 by urmas
Hello all,  I am developing a gel script that is very similar to the solution provided by Chris_Hackett in this thread:http://caforums.ca.com/t5/CA-Clarity-General-Discussion/GEL-email-address-and-NSA-email-server-settings/m-p/8751  It’s a gel script in a process that sends mails notifications to users who haven’t filled their timesheets.  It worked fine two weeks ago, but was put in draft mode waiting for customer validation.Now when I start the process I get this error:     BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:248:91: Unknown SMTP host: org.apache.commons.jelly.tags.sql.ResultImpl@18bf135 at org.apache.commons.jelly.tags.email.EmailTag.doTag(EmailTag.java:268) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at com.niku.union.gel.tags.ScriptTag.doTag(ScriptTag.java:20) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at com.niku.union.gel.GELScript.run(GELScript.java:80) at com.niku.union.gel.GELController.invoke(GELController.java:20) at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727) at java.lang.Thread.run(Thread.java:595) Caused by: javax.mail.MessagingException: Unknown SMTP host: org.apache.commons.jelly.tags.sql.ResultImpl@18bf135; nested exception is: java.net.UnknownHostException: org.apache.commons.jelly.tags.sql.ResultImpl@18bf135 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1280) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) at         I’m using the tag instead of the tag in order to get:- the “ server â€? attribute : specify the smtp server, since our customer doesn’t want to use the regular smtp settings in NSA. The value is stored in a custom object instance, read from the database via an SLQ query and sent to the script.- the “ attach â€? attribute : to be able to get the log file (I’m writing with core:file into a log), it’s not critical but much more easier for us.  To do that I included xmlns:mail ="jelly:email" for the mail tag, along with xmlns:core and xmlns:sql   I checked a few things:- The application server can ping our smtp.- The same gel code works fine when launched through a cmd prompt (gel my_script.xml), from both the server and my machine. (just changed gel:out to gel:log,   switched the database connection)- I added some in different places of the code to make sure the value is correct (and it’s fine !), but the mail part gets an error.- I reduced the code in an example to send just one mail to myself, removing sql or other treatments but same error.- When hard coding the smtp url (smtp.server.com) or its IP address in gel script, always the same error.-->   as long as the script is launched through a process, it won’t succeed.  So I’m out of ideas or settings to check, would anyone get a piece of advice?  I’m thinking now that the might get called wrong or is not found, hence the error. Or some other settings changed since last time, I don’t see which ones.  As a workaround I could try the regular gel:mail method, but as I said our customer would rather not, and I don’t know what to set up in the NSA. I could let go the attached file though.  Thanks for any help you might bring.  We are using Clarity 8.1.3.4545, and it runs on a Windows 2003 server machine.  Jack

Outcomes