IBM Support

SE65146: Allow a BCC address to be set when sending marketing emails

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • By default, there is no customization point in marketing code
    that allows a BCC address to be set when sending marketing
    emails.
    

Local fix

Problem summary

  • USERS AFFECTED:
    WebSphere Commerce Version 7.
    
    PROBLEM ABSTRACT:
    Allow a BCC address to be set when sending marketing emails
    
    BUSINESS IMPACT:
    Cannot customize marketing email actions.
    
    RECOMMENDATION:
    

Problem conclusion

  • A customization point is added to the marketing code to allow
    setting a CC or BCC address when sending marketing email.
    
    The following is an example of a customization to set a BCC
    email address when sending a marketing email.
    
    A) When sending a marketing email from a dialog activity when
    the "Send immediately" checkbox is selected:
    
    1.Create a custom class that extends the class
    EmailIndividualCreateCmdImpl. Implement the method
    sendEmailDirectly to update the MimeMessage on the
    EmailJobKeeper object.
    
        package com.custom.marketing;
        import javax.mail.Address;
        import javax.mail.Message;
        import javax.mail.internet.AddressException;
        import javax.mail.internet.InternetAddress;
        import
    com.ibm.commerce.emarketing.commands.EmailIndividualCreateCmdImp
    l;
        import com.ibm.commerce.emarketing.engine.EmailJobKeeper;
        import com.ibm.commerce.exception.ECException;
    
        //insert into cmdreg (storeent_id, interfacename, classname)
     values
    (0,'com.ibm.commerce.emarketing.commands.EmailIndividualCreateCm
    d', 'com.custom.marketing.ExtEmailIndividualCreateCmdImpl');
    
        public class ExtEmailIndividualCreateCmdImpl extends
    EmailIndividualCreateCmdImpl {
    
    	    protected void sendEmailDirectly(EmailJobKeeper
    mailJobKeeper) throws ECException {
    
    		    try {
    			    Address[] addresses = new Address[] { new
    InternetAddress("me@mycompany.com") };
    			    mailJobKeeper.addRecipient(Message.RecipientType.BCC,
    addresses);
    		    } catch (AddressException e) {
    			    // do nothing
    		    }
    
    		    super.sendEmailDirectly(mailJobKeeper);
    	    }
        }
    
        2. Register the custom class in the CMDREG table.
    
         insert into cmdreg (storeent_id, interfacename, classname)
    values (0,
    'com.ibm.commerce.emarketing.commands.EmailIndividualCreateCmd',
     'com.custom.marketing.ExtEmailIndividualCreateCmdImpl');
    
    B) When sending a marketing email from a dialog activity when
    the "Send immediately" checkbox not is selected, or when sending
     a marketing email from an email activity:
    
    1. Create a custom class that extends the class
    SendEmailActivityTaskCmdImpl. Implement the method sendEmail to
    update the MimeMessage on the EmailJobKeeper object.
    
        package com.custom.marketing;
        import javax.mail.Address;
        import javax.mail.Message;
        import javax.mail.internet.AddressException;
        import javax.mail.internet.InternetAddress;
        import
    com.ibm.commerce.emarketing.commands.SendEmailActivityTaskCmdImp
    l;
        import com.ibm.commerce.emarketing.engine.EmailJobKeeper;
        import com.ibm.commerce.exception.ECException;
    
        //insert into cmdreg (storeent_id, interfacename, classname)
     values (0,
    'com.ibm.commerce.emarketing.commands.SendEmailActivityTaskCmd',
     'com.custom.marketing.ExtSendEmailActivityTaskCmdImpl');
    
        public class ExtSendEmailActivityTaskCmdImpl extends
    SendEmailActivityTaskCmdImpl {
    
    	    protected void sendEmail(EmailJobKeeper mailJobKeeper)
    throws ECException {
    
    		    try {
    			    Address[] addresses = new Address[] { new
    InternetAddress("me@mycompany.com") };
    			    mailJobKeeper.addRecipient(Message.RecipientType.BCC,
    addresses);
    		    } catch (AddressException e) {
    			    // do nothing
    		    }
    
    		    super.sendEmail(mailJobKeeper);
    	    }
        }
    
    2. Create a custom class that extends the class
    ResendEmailActivityTaskCmdImpl. Implement the method sendEmail
    to update the MimeMessage on the EmailJobKeeper object.
    
        package com.custom.marketing;
        import javax.mail.Address;
        import javax.mail.Message;
        import javax.mail.internet.AddressException;
        import javax.mail.internet.InternetAddress;
        import
    com.ibm.commerce.emarketing.commands.ResendEmailActivityTaskCmdI
    mpl;
        import com.ibm.commerce.emarketing.engine.EmailJobKeeper;
        import com.ibm.commerce.exception.ECException;
    
        //insert into cmdreg (storeent_id, interfacename, classname)
     values (0,
    'com.ibm.commerce.emarketing.commands.ResendEmailActivityTaskCmd
    ', 'com.custom.marketing.ExtResendEmailActivityTaskCmdImpl');
    
        public class ExtResendEmailActivityTaskCmdImpl extends
    ResendEmailActivityTaskCmdImpl {
    
    	    protected void sendEmail(EmailJobKeeper mailJobKeeper)
    throws ECException {
    
    		    try {
    			    Address[] addresses = new Address[] { new
    InternetAddress("me@mycompany.com") };
    			    mailJobKeeper.addRecipient(Message.RecipientType.BCC,
    addresses);
    		    } catch (AddressException e) {
    			    // do nothing
    		    }
    
    		    super.sendEmail(mailJobKeeper);
    	    }
    
        }
    
    3. Register the custom classes in the CMDREG table.
    
        insert into cmdreg (storeent_id, interfacename, classname)
    values (0,
    'com.ibm.commerce.emarketing.commands.SendEmailActivityTaskCmd',
     'com.custom.marketing.ExtSendEmailActivityTaskCmdImpl');
    
        insert into cmdreg (storeent_id, interfacename, classname)
    values (0,
    'com.ibm.commerce.emarketing.commands.ResendEmailActivityTaskCmd
    ', 'com.custom.marketing.ExtResendEmailActivityTaskCmdImpl');
    

Temporary fix

Comments

APAR Information

  • APAR number

    SE65146

  • Reported component name

    WC BUS EDIT AS4

  • Reported component ID

    5724I3803

  • Reported release

    701

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-06-28

  • Closed date

    2016-07-26

  • Last modified date

    2016-07-26

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WC BUS EDIT AS4

  • Fixed component ID

    5724I3803

Applicable component levels

  • R701 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYSYL","label":"WebSphere Commerce Enterprise"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"701","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
26 July 2016