Java Reference
In-Depth Information
CHAPTER 19
E-mail
E-mail notification is an integral part of today's enterprise systems. Java enables e-mail
notification by offering JavaMail API. Using this API, you can send e-mail communica-
tions in response to an event (say a completed form or a finalized script). You can also
use the JavaMail API to check an IMAP or POP3 mailbox.
To follow along with the recipes in this chapter, make sure that you have set up your
firewall to allow e-mail communication. Most of the time, firewalls allow outbound
communications to e-mail servers without an issue, but if you are running your own loc-
al SMTP (e-mail) server, you may need to configure your firewall to allow the e-mail
server to operate correctly.
Note The JavaMail API is included as part of the Java EE download. If you are using
Java SE, you will need to download and install the JavaMail API.
19-1. Installing JavaMail
Problem
You want to install JavaMail for use by your application in sending e-mail notifications.
Solution
Download JavaMail from Oracle's JavaMail website. Currently, the download you need
is found at
Search WWH ::




Custom Search