Dynamo includes a facility for sending e-mail, and a JavaMail-based implementation for sending Internet e-mail through SMTP. The e-mail 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 e-mail.

E-mail is sent using an event listener model. A single piece of e-mail is described by an atg.service.email.EmailEvent. The SMTPEmailSender implements EmailListener, so you would send a piece of mail by calling sendEmailEvent() on the SMTPEmailSender, passing it the EmailEvent.

This event source/event listener model allows you to use EventQueues (see the Events and Event Listeners and Queues sections) to queue up e-mail messages, thereby preventing e-mail from becoming a bottleneck in high-throughput systems.

 
loading table of contents...