wood burning stoves
The moose likes Other JSE/JEE APIs and the fly likes send email with authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "send email with authentication" Watch "send email with authentication" New topic

send email with authentication

Bernd Stransky
Ranch Hand

Joined: Nov 20, 2001
Posts: 47
I am looking for an easy way to send emails via smtp and with authentication.
I have used the sun.net.smtp.SmtpClient classes from the J2SE JDK so far, which do not have authentication.
I looked at JavaMail, but my understanding is that this is part of J2EE. I just don't want to install the complete J2EE and only use a little piece of it. Also, when I bundle JavaMail with my application, could I just ship 1-2 jar files out of the J2EE?
or are their any other free java applications available to do that?
Wayne L Johnson
Ranch Hand

Joined: Sep 03, 2003
Posts: 399
You can use the JavaMail API w/out including all of J2EE. In general I use is "mail.jar" and "activation.jar", the first from JavaMail and the second from JAF. Both can be downloaded from Sun. I've used JavaMail not only to send email (w/ and w/out attachments) but to retrieve mail using IMAP. It works fine.
Nehul NN
Ranch Hand

Joined: Nov 05, 2003
Posts: 45
I have configure my application same way using Tomcat without J2EE. Just add "mail.jar" & "activation.jar" classpath or /WEB-INF/lib directory of tomcat.
I agree. Here's the link: http://aspose.com/file-tools
subject: send email with authentication
It's not a secret anymore!