tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: resource configuration for jndi mail
Date Mon, 06 Aug 2012 17:52:07 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

On 8/6/12 12:59 PM, Mark Eggers wrote:
> There are a lot of properties available, but unfortunately there is
> no password. However, the hint is there (in the paragraph that you
> quoted).
> 
> After trolling the source for Tomcat 6 (and a bit of searching on
> the Internet), it appears that a password can be specified. The
> source in question is:
> 
> org.apache.naming.factory.MailSessionFactory.java
> 
> The attribute is password (in the Resource definition). That looks
> like the only additional (non JavaMail API) attribute / property
> that this factory supports (hence the hint).

I actually didn't know that. I had forgotten to mention that this is a
possibilty:

Session session = ... ; //get from JNDI
Transport tx = session.getTransport(...);

tx.connect(host, rt, username, password);

...but if Tomcat will do it for you, why not let it?

> I've never been fond of maintaining the same information in
> multiple places, so postfix is probably good in this environment.
> 
> Sounds like I should submit a couple of patches to the
> documentation.
> 
> 1. Add the paragraph from Tomcat 7 back into Tomcat 6 2. Add a
> paragraph to both stating that Tomcat's MailSessionFactory supports
> "password" as the only additional attribute / property.

That would be great.

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAgBEcACgkQ9CaO5/Lv0PDrZACfXTySVuyiB5bGiqAAHmkZtbmE
L4MAmwRBK7p2SFuAQg7DGgqGjEB2Ot/4
=xYjg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message