Posted: 2 Jun 2016 10:04 EDT Last activity: 2 Jun 2016 15:23 EDT
Email listener password management
I am looking to change how we manage and get our mailbox password for our email listener. Currently we have hard coded the mailbox password and we were looking for other alternative approaches for retrieving the password, rather than hard coding it. Any thoughts?
You could use a data page to store the value, but I think that's still pretty much hard coding it (just not directly on the email account rule form). What exactly are you looking to do? Update the password without logging into the developer portal?
Posted: 4 years ago
Updated: 4 years ago
Posted: 2 Jun 2016 11:41 EDT Updated: 2 Jun 2016 13:49 EDT
The email listener and email server records support the use of global resource settings that allow for dynamic values. Here are the fields that support GRS:
Send Email As
Send Email As
Using the Global Resource Settings feature
When you migrate applications from one server or environment to another, references to the external systems that those applications connect to, such as endpoint URLs and JNDI servers, might change. By using the Global Resource Settings feature, you can set values for these references without hard coding them into your application.
Create a class to hold the references to external systems (also known as environment properties).
Create a property for each reference to an external system. These are the environment properties. Pega 7 Platform includes standard embedded classes and default properties for each rule form that supports the Global Resource Settings syntax. For information on how to use these embedded classes to create properties, see PDN article How to reduce maintenance of service rules and listeners with Global Resource Settings.
Set the values of the environment properties. As a best practice, use a data transform to set these values.
Create a data page rule that references the class from Step 1 and the data transform from Step 3.
Update the LoadResourceSettings activity to load the data transform that you created in Step 3.
Use the Resource Settings syntax (=PageName.PropertyName) when entering references to external systems.
Email account supports global resource settings for many of the same fields as the (now deprecated) email server. I've confirmed that both the User ID and Password fields on email account records provide this support. We will update our documentation for email account in a future release.