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

Reference to D_GlobalParam does not work in email accounts

SA-65586

Summary



In email accounts, the reference to the D_GlobalParam data page does not work.
This occurs after upgrading to Pega 7.4.



Error Messages



Not Applicable.


Steps to Reproduce

  1. Open Designer Studio > Integration > Email > Email Accounts
  2. Open any email that is running successfully
  3. Set the Host value using Global Resource Settinfgs. For example, D_GlobalParam)
  4. Run the flow. The account verification fails.


Root Cause



An issue in the custom application code or rules. 


Resolution

Perform the following local-change: 

For Sender:

  1. Open 'Data-EmailAccount. SMTPConnectivity' and save as to an open the ruleset
  2. Edit the Java Step 6 and add the below code. The modified code should look like the following:

// get tools

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


 

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);
     }

 

For Receiver:

  1. Open 'Data-EmailAccount.POP3orIMAPConnectivity' and save as to an open the ruleset
  2. Edit the Java step 5 and add the below code. The modified code should look like the following:

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);
    }



 

Published October 12, 2018 - 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