[jboss-user] [jBPM] New message: "Re: Unable to set the mail configuration properties in JBPM 4.0"

ciccio ciccio do-not-reply at jboss.com
Wed Mar 3 09:27:26 EST 2010


User development,

A new message was posted in the thread "Unable to set the mail configuration properties in JBPM 4.0":

http://community.jboss.org/message/529652#529652

Author  : ciccio ciccio
Profile : http://community.jboss.org/people/ciccioVega

Message:
--------------------------------------------------------------
Hi guys,
i have the same problem:
 
my jbpm.mail.properties is
mail.smtps.starttls.enable=true
mail.smtps.auth=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=465
mail.transport.protocol=smtps
mail.from=my_mail at gmail.com
mail.user=my_mail
mail.password=pwd
mail.debug=true

 
and my mail.jpdl.xml is:
<?xml version="1.0" encoding="UTF-8"?>

<process name="MyMAIL" xmlns="http://jbpm.org/4.3/jpdl">
   <start g="126,51,48,48" name="start1">
      <transition name="to mail" to="mail" g="-60,-18"/>
   </start>
     
     <mail g="122,300,92,52" name="mail">
      <from addresses="my_mail at gmail.com"/>
     <to addresses="my_other_mail at gmail.com"/>
     <subject>hello</subject>  
     <text>world</text>
        <transition name="to end1" to="end1" g="-42,-18"/>
     </mail>
   <end name="end1" g="169,444,48,48"/>
     
</process>

 
It not works: console:
15:12:09,316 DEBUG [ProcessDefinitionImpl] creating new execution for process 'MyMAIL'
15:12:09,316 DEBUG [DatabaseIdComposer] generated execution id MyMAIL.4160002
15:12:09,316 DEBUG [ExecuteActivity] executing activity(start1)
15:12:09,316 DEBUG [ExecuteActivity] executing activity(moveFile)
15:12:09,332 INFO  [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTran
sport,Sun Microsystems, Inc]
15:12:09,472 INFO  [STDOUT] DEBUG SMTP: useEhlo true, useAuth false
15:12:09,472 INFO  [STDOUT] DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL false

and then i have an Request-timeout exception in jbpm-console.
 
If i write in jbpm.mail.properties *mail.smtps.host*=smtp.gmail.com instead of *mail.smtp.host*=smtp.gmail.com, in console i see 
...trying to connect to host localhost, port 465, isSSL false

I've tried also to write a java appl standalone and made it runs under jbpm process and it works fine.
 
public class SendMail {
 
    private static final String SMTP_HOST_NAME = "smtp.gmail.com";
    private static final int SMTP_HOST_PORT = 465;
    private static final String SMTP_AUTH_USER = "my_mail at gmail.com";
    private static final String SMTP_AUTH_PWD  = "pwd";
 
    public static void main(String[] args) throws Exception{
       new SendMail().test();
    }
 
    public void test() throws Exception{
        Properties props = new Properties();
 
        props.put("mail.transport.protocol", "smtps");
        props.put("mail.smtps.host", SMTP_HOST_NAME);
        props.put("mail.smtps.auth", "true");
        // props.put("mail.smtps.quitwait", "false");
 
        Session mailSession = Session.getDefaultInstance(props);
        mailSession.setDebug(true);
        Transport transport = mailSession.getTransport();
 
        MimeMessage message = new MimeMessage(mailSession);
        message.setSubject("Testing SMTP-SSL");
        message.setContent("This is a test", "text/plain");
 
        message.addRecipient(Message.RecipientType.TO,
             new InternetAddress("my_other_mail at gmail.com"));
 
        transport.connect
          (SMTP_HOST_NAME, SMTP_HOST_PORT, SMTP_AUTH_USER, SMTP_AUTH_PWD);
 
        transport.sendMessage(message,
            message.getRecipients(Message.RecipientType.TO));
        transport.close();
    }
}

 
Any idea??
TIA

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/529652#529652




More information about the jboss-user mailing list