JavaMail Section Index | Page 23
How do I send mail from an applet?
There are many different ways:
You can speak SMTP directly
You can use the non-standard sun.net.smtp.SmtpClient class
You can use the JavaMail API
Keep in mind though that the SMTP server to use...more
How can I get a list of messages from my POP3 server?
After getting a POP3 provider for JavaMail (quite possibly from Sun at http://java.sun.com/products/javamail/pop3.html,
getting a list of messages involves the following steps:
Creating a session...more
How do I send mail using the non-standard sun.net.smtp.SmtpClient class?
Sun's Java runtime environments (as well as the ones included with Netscape Communicator and Internet Explorer) include the SmtpClient class. As part of the sun.net package, it is not a standard J...more
I am trying to send a mail through JavaMail but I am getting an exception: Could not connect to SMTP host 25. How to give this SMTP host?
If you get an exception like:
Exception in thread "main" javax.mail.MessagingException: Could not connect to SMTP host: www.myhost.com, port: 25;
it means there is no mail (SMTP) serv...more
What is the proverbial "Hello, World" program for JavaMail?
The following program will send a mail message. It requires three command line arguments:
SMTP Server
From Email Address
To Email Address
An example start follows:
java MailExample smtp.mailse...more
Is there a mailing list for discussion of the JavaMail API?
Sun manages the JAVAMAIL-INTEREST list. You can signup at http://archives.java.sun.com/archives/javamail-interest.html.more
How can I send mail when I don't have the JavaMail libraries installed?
Assuming you have access to an SMTP server that will accept your request, you can either open up a socket connection to port 25 and send the raw SMTP commands, or use the non-standard sun.net.smtp...more
What is the basic SMTP protocol for sending mail?
RFC 2821 (http://www.faqs.org/rfcs/rfc2821.html) defines the SMTP protocol. To send a message you would normally open up port 25 on your mail server and send the following information:
HELO sendi...more
What do I need to acquire in order to get started with JavaMail?
The reference JavaMail implementation is available from Sun from http://java.sun.com/products/javamail/. You also need the JavaBeans Activation Framework extension from http://java.sun.com/beans/g...more
How can I send email from a JSP page?
The JavaMAIL API is the standard mechanism for sending email. See the JavaMail FAQ for how to use it. You can place j2ee.jar (or mail.jar and activation.jar) under web-inf/lib folder in tomcat3.2....more
How do I send email from a servlet?
From:
James Cooper (pixel@bitmechanic.com)
GSP and GnuJSP both come with SMTP classes that make sending email very
simple. if you are writing your own servlet you could grab one of the
many SM...more