Need Sensitivity and Importance feature in the Email

We are reusing the Email Feature available in Pega 8.8, in this we need to add the Sensitivity like Confidential, Private and Importance like High Medium in the Email which is not supporting OTB.

@Kannanmca :warning: This is a GenAI-powered tool. All generated answers require validation against the provided references.

:warning: This is a GenAI-powered tool. All generated answers require validation against the provided references.

Current Limitation

The primary challenge is that Pega 8.8’s email functionality, when using Microsoft Graph for email sending (which is common in many Pega implementations), does not support custom headers out-of-the-box. Microsoft Graph API has limitations regarding the addition of custom email headers, including Sensitivity and Importance headers.

Potential Solutions

Here are some approaches you could consider:

1. Custom Java Code Implementation

You can extend the email functionality by creating a custom activity that uses JavaMail API directly instead of relying on the standard SendEmailNotification activity:

// Sample code to add Sensitivity and Importance headers
Properties props = new Properties();
Session session = Session.getDefaultInstance(props);
MimeMessage message = new MimeMessage(session);

 
// Set headers before sending
message.setHeader("Importance", "High"); // Options: High, Normal, Low
message.setHeader("Sensitivity", "Confidential"); // Options: Confidential, Private, Normal

 
// Configure other email properties and send

2. Custom Email Service Rule

Create a custom Email Service rule that extends the standard email functionality:

  1. Create a new Service rule for email sending
  2. Override the default behavior to include custom header handling
  3. Use Java steps within the service to add the required headers
  4. Call this custom service instead of the standard email activities

3. Alternative Email Protocol

If possible, consider using an alternative email protocol that supports custom headers more effectively than Microsoft Graph. SMTP-based implementations often provide more flexibility for header customization.

Implementation Considerations

  1. Testing: Thoroughly test any custom implementation across different email clients to ensure the headers are properly recognized.
  2. Maintenance: Custom implementations may require updates when upgrading Pega versions.
  3. Documentation: Maintain clear documentation of your custom solution for future reference.
  4. Performance: Monitor for any performance impacts when using custom email sending logic.

References

  1. Pega Support: Email headers with Microsoft Graph - Confirms Microsoft Graph limitations for custom headers
  2. JavaMail API Header Implementation - Shows how to add Importance headers in Java code
  3. OutSystems Forum: Sending emails with Sensitivity and Importance - Discusses similar implementation challenges