Oracle ATG Web Commerce includes a facility for sending e-mail, and a JavaMail-based implementation for sending Internet email through SMTP. The email interface is called atg.service.email.EmailListener
, and the SMTP implementation is called atg.service.email.SMTPEmailSender
. Internally, SMTPEmailSender
uses JavaMail’s SMTP implementation to send the email.
E-mail is sent using an event listener model. A single piece of email is described by an atg.service.email.EmailEvent
. The SMTPEmailSender
implements EmailListener
, so you can send a piece of mail by calling sendEmailEvent()
on the SMTPEmailSender
, passing it the EmailEvent
.
This event source/event listener model lets you use EventQueues
(see the Events and Event Listeners and Queues sections) to queue up email messages, thereby preventing email from becoming a bottleneck in high-throughput systems.