E-mail activity delivery algorithm

E-mail activity delivery requires the JavaMail API. E-mail messages are easily created and delivered through the use of this API's SMTP server interface, and the object-oriented model of the standard MIME e-mail message format. Delivery is started on the day the business user specified in the e-mail activity. The WebSphere Commerce scheduler launches a job at the specified date and time which starts the e-mail activity delivery.

The email activity delivery algorithm is as follows:

  1. Look up the e-mail promotion scheduled for delivery, including the target customer segment and e-mail template.
  2. Query the target customer segment for the e-mail activity to obtain the list of recipients.
  3. Verify that each recipient has opted to receive e-mail, as specified in the EMLUSRRECV table.
  4. Read the e-mail configuration data through the administrative console.
  5. Connect to the SMTP server according to the outbound e-mail configuration.
  6. Iterate through every recipient calling the e-mail template for each.
  7. Add the inbound account address as the "sender" e-mail address, and the outbound account address as the "replyTo" address.
  8. Send the e-mail message.
  9. Disconnect and update the state of the e-mail activity.

It should be noted that the SMTP server used should adhere to the following RFC specifications:

  1. Email address adhering to RFC 822 (* stores should enforce this for registration)
  2. POP3 server as defined in RFC 1939 capable of delivering Delivery Status Notification(DSNs) as defined in RFC 1894
  3. SMTP server as defined in RFC 2821

For more information about RFCs, refer to www.ietf.org/rfc.html.