You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Mike K <mo...@hotmail.com> on 2002/03/09 14:38:24 UTC
Re: javax.mail.Session access protection (part III)
My test shows how you can get the default javax.mail.Session from JAMES. The
JAMESMailSessionHackTest class tries to connect to a SMTP host (in our case
JAMES) and if this successful then it sends an email to the test@localhost
account. To connect to a SMTP host you must have the SMTP host address, an
user account and a password. But in the JAMESMailSessionHackTest class is no
SMTP host address, user account or a password specified. If you do the test
(previous email) then I think you should be surprised then the
JAMESMailSessionHackTest class can send the email even though the connection
could not be established normally. Or?
Bye
michi
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: javax.mail.Session access protection (part III)
Posted by Danny Angus <da...@thought.co.uk>.
False assumptions I'm afraid..
To connect to a SMTP host you must have the SMTP host
> address, an
> user account and a password.
No, all you need is an email address .. using DNS your app (in this case
javax.Mail) will locate the appropriate host, and send the mail using SMTP
on prot 25.
> But in the JAMESMailSessionHackTest
> class is no
> SMTP host address, user account or a password specified. If you
> do the test
Yes, in fact you have specified enough:...
mm.addRecipient(Message.RecipientType.TO, new
InternetAddress("test@localhost"));
...to tell javax mail everything it needs to know to deliver the message to
localhost.
> (previous email) then I think you should be surprised then the
> JAMESMailSessionHackTest class can send the email even though the
> connection
> could not be established normally. Or?
Why do you say that? if you telnet to localhost 25 you should see James'
hello message.
You appear to have merely written a programme that sends an email to
test@localhost.
d.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>