Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Global Resource Setting Syntax does not work in DataEmailAccount

SA-65765

Summary



When the email account name is being set in the Data-EmailAccount instance from a data page using the Global Resource Settings syntax, the system does not use the value held in the data page when the 'Test Connectivity' button is pressed. Instead the string value of the reference itself is used as the email account name.


Error Messages



DEBUG: setDebug: JavaMail version 1.5.5
DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle]
DEBUG IMAPS: mail.imap.partialfetch: false
DEBUG IMAPS: mail.imap.ignorebodystructuresize: false
DEBUG IMAPS: mail.imap.statuscachetimeout: 1000
DEBUG IMAPS: mail.imap.appendbuffersize: -1
DEBUG IMAPS: mail.imap.minidletime: 10
DEBUG IMAPS: closeFoldersOnStoreFailure
DEBUG IMAPS: trying to connect to host "outlook.office365.com", port 993, isSSL true
* OK The Microsoft Exchange IMAP4 service is ready. [RABCADYAUAAxADkAMwBDAEEAMAAwANgAuAEUAVQMALgBQAFIATwBEAC4ATwBVAFQATABPAE8ASwAuAEMATwBNAA==]
A0 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
A0 OK CAPABILITY completed.
DEBUG IMAPS: AUTH: PLAIN
DEBUG IMAPS: AUTH: XOAUTH2
DEBUG IMAPS: protocolConnect login, host=outlook.office365.com, user==Declare_EnvSettings.EmailListenerAddress, password=<non-null>
DEBUG IMAPS: AUTHENTICATE PLAIN command trace suppressed
DEBUG IMAPS: AUTHENTICATE PLAIN command result: A1 NO AUTHENTICATE failed.



Steps to Reproduce



Unknown.


Root Cause



A defect in Pegasystems’ code or rules. 


Resolution

Perform the following local-change:

  1. Open the 'Data-EmailAccount.POP3orIMAPConnectivity' rule from the Pega-IntegrationArchitect ruleset
  2. Save it to the user ruleset
  3. Open Step 5 (a Java step) on the rule and scroll down to line 156:


     
  4. Insert the below code before that line:

    final String[] ACCOUNT_KEYS = { "pyHost", "pySMTPUserName", "pyEmailAddress", "pyReplyTo", "pyAdminEmail", "pySMTPPort", "pyReceiverHost", "pyReceiverUserID", "pyReceiverPort", "pyKeyStoreInstance", "pyKeystoreAlias"};

    for (String key : ACCOUNT_KEYS) {

        String res = svcUtilPriv.getStringIndirect(emailAccount,key);

        emailAccount.putString(key, res);
    }



     
  5. Save the changed rule
  6. Open the 'Data-EmailAccount.SMTPConnectivity' rule from the Pega-IntegrationArchitect ruleset
  7. Save it to the user ruleset
  8. Open Step 6 (a Java step) on that rule:


     
  9. Before line 1, insert the below code:

    // get tools
    ServiceUtils svcUtils = tools.getServiceUtils();
    com.pega.pegarules.priv.util.ServiceUtilsPriv svcUtilPriv = pega.getServiceUtilsPriv();

     
  10. Scroll down to the line that is now line 35 and insert before that line the code below:

    final String[] ACCOUNT_KEYS = { "pyHost", "pySMTPUserName", "pyEmailAddress", "pyReplyTo", "pyAdminEmail", "pySMTPPort", "pyReceiverHost", "pyReceiverUserID", "pyReceiverPort", "pyKeyStoreInstance", "pyKeystoreAlias"};
    for (String key : ACCOUNT_KEYS) {
        String res = svcUtilPriv.getStringIndirect(emailAccount,key);
        emailAccount.putString(key, res);
    }


     
  11. Save the rule

Published August 19, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us