com.ibm.commerce.emarketing.engine

Class POP3BouncedEmailReporter

  • java.lang.Object
    • com.ibm.commerce.emarketing.engine.POP3BouncedEmailReporter
  • All Implemented Interfaces:
    BouncedEmailReporter


    public class POP3BouncedEmailReporter
    extends java.lang.Object
    implements BouncedEmailReporter
    A POP3 implementation of BouncedEMailReporter. This implementation connects to a POP3 server using the host name, port, account name, password and search header provided to the constructor. The search header is intended to match a header added to the original email message that caused the Delivery Status Notification (bounced back) message to be sent. SMTPDistributor is an example of a class that and delivers a message with such a header.
    • Field Summary

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

      Constructors 
      Constructor and Description
      POP3BouncedEmailReporter(java.lang.String serverpa, int portpa, java.lang.String accountpa, java.lang.String passwordpa, java.lang.String searchHeaderpa)
      Constructor.
      POP3BouncedEmailReporter(java.lang.String serverpa, int portpa, java.lang.String accountpa, java.lang.String passwordpa, java.lang.String searchHeaderpa, boolean ssl)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      BouncedEmailReport[] getBouncedEmailReport()
      Reports all email addresses that bounced to the address passed in the constructor that contains the search header that was passed in the constructor.
      void purge()
      assigns the private members to new objects
      void setDeleteMessages(boolean delete)
      Tells the reporter to delete e-mail messages within the account passed to the contstructor.
      • Methods inherited from class java.lang.Object

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

    • Constructor Detail

      • POP3BouncedEmailReporter

        public POP3BouncedEmailReporter(java.lang.String serverpa,
                                        int portpa,
                                        java.lang.String accountpa,
                                        java.lang.String passwordpa,
                                        java.lang.String searchHeaderpa)
        Constructor.
        Parameters:
        server - the hostname of the SMTP server to which a connection will be attempted.
        port - the port through which the connection will be attempted.
        account - the account on the SMTP server to use.
        password - the password of the account on the server.
        searchHeader - the header identifying the origin of the email.
      • POP3BouncedEmailReporter

        public POP3BouncedEmailReporter(java.lang.String serverpa,
                                        int portpa,
                                        java.lang.String accountpa,
                                        java.lang.String passwordpa,
                                        java.lang.String searchHeaderpa,
                                        boolean ssl)
        Constructor.
        Parameters:
        serverpa - the hostname of the SMTP server to which a connection will be attempted.
        portpa - the port through which the connection will be attempted.
        accountpa - the account on the SMTP server to use.
        passwordpa - the password of the account on the server.
        searchHeaderpa - the header identifying the origin of the email.
        ssl - use an SSL connection to the SMTP server
    • Method Detail

      • getBouncedEmailReport

        public BouncedEmailReport[] getBouncedEmailReport()
                                                   throws java.net.UnknownHostException,
                                                          java.io.IOException
        Reports all email addresses that bounced to the address passed in the constructor that contains the search header that was passed in the constructor. This method will delete ALL email messages within the account passed in the constructor (if setDeleteMessages() has been set to true).
        Specified by:
        getBouncedEmailReport in interface BouncedEmailReporter
        Returns:
        An array of BouncedEmailReport objects that represent all bounced email addresses found that contain the given searchHeader.
        Throws:
        java.net.UnknownHostException - thrown when the host cannot be located on the network
        java.io.IOException - thrown when communication through IO streams/sockets fail.
      • purge

        public void purge()
        assigns the private members to new objects
      • setDeleteMessages

        public void setDeleteMessages(boolean delete)
        Tells the reporter to delete e-mail messages within the account passed to the contstructor.
        Specified by:
        setDeleteMessages in interface BouncedEmailReporter
        Parameters:
        delete - Delete every e-mail message if true; do not delete otherwise. Default is false.2