|
Java™ by example!
|
|
|
How do I send an email using JavaMail?
This example assumes you have JavaMail1.2 installed. It can be downloaded from http://java.sun.com/products/javamail/. Add both mail.jar and activation.jar to your classpath. Set the property mail.smtp.host with your SMTP host, create a session, tie it to your message and send it with the Transport class. It's that simple!
SendMessage.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|