Maciej Swiderski [
http://community.jboss.org/people/swiderski.maciej] replied to the
discussion
"Unable to set the mail configuration properties in JBPM 4.3"
To view the discussion, visit:
http://community.jboss.org/message/548884#548884
--------------------------------------------------------------
As both Alejandro and HuiSheng mentioned you shall use javax.mail.Authenticator to achieve
what you described.
I have made few tests with that and it seems to work properly but it is not documented
officially anywhere.
Following is brief description of steps needed to configure and use it:
1. Create custom implementation of Authenticator interface:
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
public class MyAuthenticator extends Authenticator {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("your user name", "your
password");
}
}
2. Configure jbpm to use your custom Authenticator, extend default jbpm configuration:
<mail-session>
<mail-server>
<session-properties resource="jbpm.mail.properties" />
<authenticator class="MyAuthenticator"
auto-wire="true"/>
</mail-server>
</mail-session>
3. mail settings (jbpm.mail.properties):
mail.smtp.auth=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=465
mail.smtp.socketFactory.port=465
mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
After these steps I was able to send emails from my gmail account to any email address.
HTH
Maciej
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/548884#548884]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]