http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html

-Tim

Brian Silberbauer wrote:
Hi all

I have just managed to work out how to create an authenticated JavaMail session with JNDI in Tomcat, but it is a slight hack - I was wondering whether anybody has a better idea of how to go about it.

The problem is one can't store the password in the properties, JavaMail does not pick this up - I got around it by specifying the password in the properties vi a ResourceParameter in the server.xml, and then passing the property through explicitly:

java.util.Properties props = mailsession.getProperties();

transport.connect(null, null, props.getProperty("mail.smtp.password"));

This works for me, but is there a better way of doing this?

Brian



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to