JR45182: CMVC 225804 - MAKE THAT SENDER ATTRIBUTE ON EMAILS CAN BE MODIFIED WITHIN CODE FOR CUSTOM EMAIL TEMPLATES.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • The 'Sender' field on marketing e-mails can not be set by custom
    code. Currently the value is derived from the Administration
    Console under the menu Store -> Configuration -> Email
    Activities -> Inbound Account -> E-mail address and applies to
    all marketing e-mail.
    

Local fix

Problem summary

  • USERS AFFECTED:
    WebSphere Commerce users on v7.0 who send marketing e-mail.
    
    PROBLEM ABSTRACT:
    The 'Sender' field on marketing e-mails can not be set by custom
    code.
    
    BUSINESS IMPACT:
    Customer has a requirement to set the Sender field in e-mail
    sent from the store to be a different e-mail address than the
    address set in the Administration Console.  That requirement
    cannot be met.
    
    RECOMMENDATION:
    

Problem conclusion

  • A new method (setSender) was added to the class EmailJobKeeper.
    A customization can use this method to set the Sender e-mail
    address for marketing e-mail.
    
    The following is an example of the required customization:
    
    1) To set the Sender e-mail address when sending a marketing
    e-mail from a dialog activity when the "Send immediately"
    checkbox is selected:
    
    a) Create a custom class that extends the class
    EmailIndividualCreateCmdImpl. Implement the method
    sendEmailDirectly to set the sender e-mail address on the
    EmailJobKeeper object.
    
    package com.custom.marketing;
    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.EmailIndividualCreateCmd',
    'com.custom.marketing.ExtEmailIndividualCreateCmdImpl');
    
    public class ExtEmailIndividualCreateCmdImpl extends
    EmailIndividualCreateCmdImpl {
    
     protected void sendEmailDirectly(EmailJobKeeper mailJobKeeper)
    throws ECException {
      mailJobKeeper.setSender("sender@company.com");
      super.sendEmailDirectly(mailJobKeeper);
     }
    
    }
    
    b) 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');
    
    2) To set the Sender e-mail address when sending a marketing
    e-mail from a dialog activity when the "Send immediately"
    checkbox not is selected, or when sending a marketing e-mail
    from an e-mail activity:
    
    a) Create a custom class that extends the class
    SendEmailActivityTaskCmdImpl. Implement the method sendEmail to
    set the sender e-mail address on the EmailJobKeeper object.
    
    package com.custom.marketing;
    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 {
      mailJobKeeper.setSender("sender@company.com");
      super.sendEmail(mailJobKeeper);
     }
    }
    
    b)  Create a custom class that extends the class
    ResendEmailActivityTaskCmdImpl. Implement the method sendEmail
    to set the sender e-mail address on the EmailJobKeeper object.
    
    package com.custom.marketing;
    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 {
      mailJobKeeper.setSender("sender@company.com");
      super.sendEmail(mailJobKeeper);
     }
    
    }
    
    c) 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');
    
    
    -------------------------------------------------------------
    The latest available maintenance information can be obtained
    from the Recommended Fixes for WebSphere Commerce technote:
    http://www.ibm.com/support/docview.wss?rs=3046&uid=swg21261296
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR45182

  • Reported component name

    WC BUS EDITION

  • Reported component ID

    5724I3800

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-12-17

  • Closed date

    2013-01-30

  • Last modified date

    2013-01-30

  • 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 EDITION

  • Fixed component ID

    5724I3800

Applicable component levels

  • R700 PSY

       UP



Rate this page:

(0 users)Average rating

Document information


More support for:

WebSphere Commerce Enterprise

Software version:

7.0

Reference #:

JR45182

Modified date:

2013-01-30

Translate my page

Machine Translation

Content navigation