You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Alexander Banthien <al...@questech.de> on 2002/07/10 09:07:29 UTC

Mail and App-servers

Helo :-)

here is a question about the util.mail classes.

I am trying to use the Turbine mail classes in an environment where I am
trying to use Turbine in Weblogic 6.1.

WL docs tell me to do:

---------------------------------------------------------------
InitialContext ic = new InitialContext();
Session session = (Session) ic.lookup("myMailSession");

Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", "mailhost");
// use mail address from HTML form for from address
props.put("mail.from", emailAddress);
Session session2 = session.getInstance(props);
-----------------------------------------------------------------

this is round about what is done in
org.apache.turbine.util.mail.Email.getSession(), exept for the first two
lines. I thought about overriding this method in a custom class, but
found out, that getSession() is private to Email.

Why private?, can't it be made protected, so people can easily override?

How else would I be able to get my javax.mail.session from my
InitialContext?

Thanks in advance,

Alex


--

Mit freundlichen Grüßen
Alexander Banthien

_______________________________________
Questech GmbH
Schwarzwaldstr. 19
79199 Kirchzarten

Fon: +49 (0)7661 90 35-15
Fax: +49 (0)7661 90 35-20
www.questech.de

_______________________________________




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>