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:  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 at at at org.apache.commons.jelly.TagSupport.invokeBody( at com.niku.union.gel.tags.ScriptTag.doTag( at at at com.niku.union.gel.GELController.invoke( at at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ at Caused by: javax.mail.MessagingException: Unknown SMTP host: org.apache.commons.jelly.tags.sql.ResultImpl@18bf135; nested exception is: org.apache.commons.jelly.tags.sql.ResultImpl@18bf135 at com.sun.mail.smtp.SMTPTransport.openServer( at com.sun.mail.smtp.SMTPTransport.protocolConnect( 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 ( 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, and it runs on a Windows 2003 server machine.  Jack