com.ibm.commerce.emarketing.engine

Class SMTPDistributor

  • java.lang.Object
    • com.ibm.commerce.emarketing.engine.SMTPDistributor


  • public class SMTPDistributor
    extends java.lang.Object
    The SMTP distributor is a utility to deliver a bunch of email prepared inside Email Job Keeper, For large volume of email, the email-sending will be split into multiple scheduler-job; and for each scheduler-job, the Email Job Keeper will prepare certain amount of email. The SMTP distributor can distribute email through an SMTP compliant server, it uses the JavaMail API standard to create messages and deliver them through the SMTP protocol.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      Copyright.
    • Constructor Summary

      Constructors 
      Constructor and Description
      SMTPDistributor(EmailJobKeeper jobKeeper, boolean buildRec)
      The SMTP distributor is a utility to deliver a bunch of email prepared inside Email Job Keeper, For large volume of email, the email-sending will be split into multiple scheduler-job; and for each scheduler-job, a new SMTPDistriubter will go to the Email Job Keeper to get the sending-job (email template, email account info, etc) and a list of recipients that are scheduled for the same schedule.
      SMTPDistributor(EmailJobKeeper jobKeeper, boolean buildRec, boolean newIndividualEmail)
      The SMTP distributor is a utility to deliver a bunch of email prepared inside Email Job Keeper, For large volume of email, the email-sending will be split into multiple scheduler-job; and for each scheduler-job, a new SMTPDistriubter will go to the Email Job Keeper to get the sending-job (email template, email account info, etc) and a list of recipients that are scheduled for the same schedule.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void distribute()
      Distributes the PersonalizedEmailContent to the list of recipients, PersonalizedEmailContent & Email recipients are store in the Email Job Keeper.
      void distribute(PersonalizedEmailContent emailContent, java.util.List emailRecipients)
      Distributes the EmailContent to the list of recipients.
      java.util.List getFailedRecipients()
      Returns the list of EmailRecipient objects to which the message failed to be delivered.
      java.util.List getSuccessfulRecipients()
      Returns the list of EmailRecipient objects to which the message was successfully delivered.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • SMTPDistributor

        public SMTPDistributor(EmailJobKeeper jobKeeper,
                               boolean buildRec)
        The SMTP distributor is a utility to deliver a bunch of email prepared inside Email Job Keeper, For large volume of email, the email-sending will be split into multiple scheduler-job; and for each scheduler-job, a new SMTPDistriubter will go to the Email Job Keeper to get the sending-job (email template, email account info, etc) and a list of recipients that are scheduled for the same schedule.
        Parameters:
        jobKeeper - the Email Job Keeper will keep all info about a email-sending-job which may need multiple schedule to finish it.
        buildRec - the flag to tell if a recipient list (failed & succeeded) should be created when sending the email
      • SMTPDistributor

        public SMTPDistributor(EmailJobKeeper jobKeeper,
                               boolean buildRec,
                               boolean newIndividualEmail)
        The SMTP distributor is a utility to deliver a bunch of email prepared inside Email Job Keeper, For large volume of email, the email-sending will be split into multiple scheduler-job; and for each scheduler-job, a new SMTPDistriubter will go to the Email Job Keeper to get the sending-job (email template, email account info, etc) and a list of recipients that are scheduled for the same schedule.
        Parameters:
        jobKeeper - the Email Job Keeper will keep all info about a email-sending-job which may need multiple schedule to finish it.
        buildRec - the flag to tell if a recipient list (failed & succeeded) should be created when sending the email
        newIndividualEmail - set to true if the e-mail is being sent to one individual customer.
    • Method Detail

      • distribute

        public void distribute()
                        throws javax.mail.MessagingException
        Distributes the PersonalizedEmailContent to the list of recipients, PersonalizedEmailContent & Email recipients are store in the Email Job Keeper. As a result, the URL will be hit once per recipient setting the "recipientId=" query string parameter to the ID of the recipient passed by the recipient supplier. The result of the URL hit will then be sent to the recipient.
        Throws:
        javax.mail.MessagingException - Thrown when JavaMail throws a MessagingException.
      • distribute

        public void distribute(PersonalizedEmailContent emailContent,
                               java.util.List emailRecipients)
                        throws javax.mail.MessagingException
        Distributes the EmailContent to the list of recipients.
        Parameters:
        emailContent - the object representing the content of the email.
        emailRecipients - list the recipients of the email.
        Throws:
        javax.mail.MessagingException - Thrown when JavaMail throws a MessagingException.
      • getFailedRecipients

        public java.util.List getFailedRecipients()
        Returns the list of EmailRecipient objects to which the message failed to be delivered.
        Returns:
        the list of EmailRecipient objects to which the message failed to be delivered.
      • getSuccessfulRecipients

        public java.util.List getSuccessfulRecipients()
        Returns the list of EmailRecipient objects to which the message was successfully delivered.
        Returns:
        the list of EmailRecipient objects to which the message was successfully delivered.