tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lio tomcat" <lio.tom...@gmail.com>
Subject javamail for numerous mail servers on tomcat
Date Fri, 19 May 2006 12:51:48 GMT
Hello world,

I'm trying to use javamail api in order to fecth/sen mails in a tomcat servlet.
Sor far, it's fine. more : it works.
But my needs are going beyond this firsyt step.

As i understand, the mail servers (smtp, pop, ...) are defined as
resources in tomcat (or watever servlet) in its specific config file
(server.xml).
Then the servlet is able to retrieve one of these server throught a
context, a session and a transport objects. Right?

My aim is to build dynamically (by the servlet) a transport with
parameters received in request. Clear?

By the way, i read :
"In general, applications should not need to use the classes in this
package directly.
Instead, they should use the APIs defined by javax.mail package (and
subpackages).
Applications should never construct instances of SMTPTransport directly.
Instead, they should use the Session method getTransport to acquire an
appropriate Transport object. "
(see : file:///C:/lionel/dwd/sw/javamail-1_4/javamail-1.4/docs/javadocs/index.html?index-filesindex-1.html)

So i'm wondering how i should use the Session method getTransport to
acquire an appropriate Transport object.

Or if i should let javamail down and look for another solution.

Any comment/idea/link is welcome

thx,

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


Mime
View raw message