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 specified by the Marketing Manager, at the time specified by the store administrator. 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 profile and e-mail template.
  2. Query the target customer profile for the e-mail activity to obtain the list of recipients.
  3. Read the e-mail configuration data provided by the store administrator through the administrative console.
  4. Connect to the SMTP server according to the outbound e-mail configuration.
  5. Iterate through every recipient calling the e-mail template for each.
  6. Add the inbound account address as the "sender" e-mail address, and the outbound account address as the "replyTo" address.
  7. Send the e-mail message.
  8. 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 definded in RFC 1894
  3. SMTP server as defined in RFC 2821

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