Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I configure mail for tomcat?

Tomcat and Apache

How do I configure mail for tomcat?

by  libaax  Posted    (Edited  )
COFIGURING MAIL FOR TOMCAT
1. paste the following line at the bottom, or below similar entry in <installdir>\conf\catalina.policy file: and modify the smtp server with your own.


// Permission to send email via SMTP - (permission to connect to mail server).
permission java.net.SocketPermission "smtp.host:25", "connect,resolve" ;

2. modify your <installdir>\conf\server.xml as shown blow with your relevant info...(change only "value" and not the parameters.

<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"/>
<ResourceParams name="mail/Session">
<parameter>
<name>mail.smtp.host</name>
<value>smtp-server.host</value>
</parameter>
<parameter><name>mail.smtp.user</name>
<value>username</value>
</parameter>
<parameter><name>mail.from</name>
<value>username@host.com</value>
</parameter>

3. enter the <value>smtp.host</value> line. Change the value to the name of your SMTP mailhost.

4.enter the <value>userid</value> line. Change the value to the userid you use for receiving or sending mail.

5.enter the <value>username@mail.host</value> line. Change the value to the return email address usually same as your main email.

You should now be all set to go.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top