<?xml version="1.0"?>
<server>
<mbean code="org.jboss.mail.MailService" name="jboss:service=MailSession">
<attribute name="JNDIName">mail/MailSession</attribute>
<attribute name="User">youraddress@gmail.com</attribute>
<attribute name="Password">yourpassword</attribute>
<attribute name="Configuration">
<configuration>
<property name="mail.transport.protocol" value="smtp"/>
<property name="mail.smtp.user" value="youraddress@gmail.com"/>
<property name="mail.smtp.password" value="yourpassword"/>
<property name="mail.smtp.starttls.enable" value="true"/>
<property name="mail.smtp.auth" value="true"/>
<property name="mail.smtp.host" value="smtp.gmail.com"/>
<property name="mail.smtp.port" value="465" />
<property name="mail.from"
value="recipientaddress@someserver.com"/>
<property name="mail.smtp.socketFactory.class"
value="javax.net.ssl.SSLSocketFactory" />
<property name="mail.smtp.socketFactory.port" value="465" />
</configuration>
</attribute>
</mbean>
</server>
As an active developer, I feel the benefits of open software every day. At the same time, having worked for several large corporations, I'm constantly reminded of the vast chasm dividing those of us who believe in the power of 'open', from those who think it is just another nutty hobby. This weblog is a running commentary on my experiments with various open products and libraries in an attempt to bridge this gap...
Saturday, May 2, 2009
Setting up GMail SMTP through JBoss mail-service.xml
I may have been unusually unfortunate in this respect, but based on the number of postings that reported problems trying to configure email settings on JBoss against the GMail SMTP server, I thought I'd just publish the following configuration as a confirmed successful one - simply edit your mail-service.xml under JBoss (tested against version 4.2.2.GA) to make it so:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment