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 12:19:27 GMT
Doh, missed that sentence. AFAIK, there is no way unless the 1.3 mail api 
exposes more properties for transport. (1.2 has a mail.user property but no 
password property)

-Tim

Brian Silberbauer wrote:

> 
> Thanks Tim, but that will not create an _authenticated_ SMTP connection. 
> Please read the original post.
> 
> Brian
> 
> Tim Funk wrote:
> 
>> 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
>>
> 
> 
> 
> ---------------------------------------------------------------------
> 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