tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Authenticated JavaMail Session - a better way?
Date Tue, 28 Oct 2003 11:02:41 GMT
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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


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


Mime
View raw message