Srini wrote:
>
> Does using sun.net.smtp.SmtpClient is Recommended?? Becoz i heard
> from the list long time back that using this Class is not
> recommended, instead it was recommended to use
> the javamail api,
It's a religious issue.
On one side, SmtpClient is simple and conveniently provided with the
JDK, but it's "not officially supported and subject to change" (though
it hasn't changed since JDK 1.0). JavaMail is the official way to send
email and can do fun things like attachments, but it's method calls are
obscure enough that most people need to copy someone else's code, plus
it requires the install of 2 JARs.
For more information see one of the many debates we've had on this list
in the past.
For the record, I used SmtpClient in the book because otherwise I would
have had 5 support emails a day from people having trouble getting the 2
JARs correctly placed in their CLASSPATH or forgetting that both JARs
are necessary. Maybe with "web apps" that can be less of a concern
because at least now there'll be a standard way to install JARs.
(Please think twice and then again before replying. The archives have
enough emails on this issue.)
-jh-
--
Jason Hunter
[EMAIL PROTECTED]
Book: http://www.servlets.com/book
2.0 to 2.1: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
2.1 to 2.2: http://www.javaworld.com/jw-10-1999/jw-10-servletapi.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html