<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
jbpm4.4 failed to send email
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/wiwengweng">wiwengweng wen</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/634225#634225">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>when I config the jbpm4.4 to send email. I wonder if there is a tuitor that can help me out first, then I don't have to bother all you guys. I config the jbpm.mail.cfg.xml file and the default.cfg.xml as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>*******************************************************</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>mail.cfg.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>mail.smtp.host=smtp.163.com</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>mail.smtp.port=25</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><a class="jive-link-email-small" href="mailto:mail.from=ylyy-1985@163.com" target="_blank">mail.from=ylyy-1985@163.com</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>mail.smtp.auth=true</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>********************************************************</p><p>default.cfg.xml:::</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><?xml version="1.0" encoding="UTF-8"?></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><jbpm-configuration></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  <import resource="jbpm.default.scriptmanager.xml" /></p><p>  <import resource="jbpm.mail.templates.xml" /></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  <process-engine-context></p><p>  </p><p>    <repository-service /></p><p>    <repository-cache /></p><p>    <execution-service /></p><p>    <history-service /></p><p>    <management-service /></p><p>    <identity-service /></p><p>    <task-service /></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <object class="org.jbpm.pvm.internal.id.DatabaseDbidGenerator"></p><p>      <field name="commandService"><ref object="newTxRequiredCommandService" /></field></p><p>    </object></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer" init="eager" /></p><p>    </p><p>    <object class="org.jbpm.pvm.internal.el.JbpmElFactoryImpl" /></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <types resource="jbpm.variable.types.xml" /></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <address-resolver /></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  </process-engine-context></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  <transaction-context></p><p>    <repository-session /></p><p>    <db-session /></p><p>    </p><p>    <message-session /></p><p>    <timer-session /></p><p>    </p><p>    <history-sessions></p><p>      <object class="org.jbpm.pvm.internal.history.HistorySessionImpl" /></p><p>    </history-sessions></p><p>    </p><p><mail-session></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>       <mail-server></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>         <session-properties resource= "jbpm.mail.properties"  /></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>         <authenticator class= "org.jbpm.test.wyl.MyAuthen" ></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>          <field name= "userName" ><string value= "ylyy" /></field></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>          <field name= "passWord" ><string value= (my password of the mailbox )/></field></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>         </authenticator></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>       </mail-server></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>     </mail-session> </p><p>  </transaction-context></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p></jbpm-configuration></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>******************************************************</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>then I meet this problem.in fact, I don't know what is the authentication, and how to do that . but just follow a example to do this.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>### EXCEPTION ###########################################</p><p>18:13:50,093 INF | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd@6cef4</p><p>org.jbpm.api.JbpmException: could not send email: javax.mail.internet.MimeMessage@11b86c7</p><p>    at org.jbpm.pvm.internal.email.impl.MailSessionImpl.send(MailSessionImpl.java:60)</p><p>    at org.jbpm.test.wyl.TestMail2.main(TestMail2.java:32)</p><p>Caused by: com.sun.mail.smtp.SMTPSendFailedException: 553 You are not authorized to send mail, authentication is required</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1515)</p><p>    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)</p><p>    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)</p><p>    at org.jbpm.pvm.internal.email.impl.MailSessionImpl.send(MailSessionImpl.java:51)</p><p>    ... 16 more</p><p>### EXCEPTION ###########################################</p><p>18:13:50,093 FIN | [HibernateSessionResource] ----- rolling back hibernate tx 16586768 -----------------------------------------------------</p><p>Exception in thread "main" org.jbpm.api.JbpmException: could not send email: javax.mail.internet.MimeMessage@11b86c7</p><p>    at org.jbpm.pvm.internal.email.impl.MailSessionImpl.send(MailSessionImpl.java:60)</p><p>   </p><p>Caused by: com.sun.mail.smtp.SMTPSendFailedException: 553 You are not authorized to send mail, authentication is required</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1515)</p><p>    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)</p><p>    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)</p><p>    at org.jbpm.pvm.internal.email.impl.MailSessionImpl.send(MailSessionImpl.java:51)</p><p>    ... 16 more</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/634225#634225">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>