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

EditValidate ValidEmailAddress does not work or conform RFC822



OOTB (out-of-the-box) email validation does not work as expected in Pega 7. 

Error Messages

Please enter a valid email address

Steps to Reproduce

  1. Have a text field where you can enter the email address.
  2. Validate the text field value against the validate rule, ValidEmailAddress present in Pega-ProCom:07-10-01 ruleset version.
  3. Provide the email value as "your_email@your_domain". Validation must occur as it is an invalid address.

Root Cause

With verbose class logging, it is found that Pega 7.1.6 uses mail-1.4.1.jar version and this version does not take care of RFC822. 

(Loaded javax.mail.internet.InternetAddress from file:/J:/PRPC716/apache-tomcat-8.0.9/work/Catalina/localhost/prweb/extractedFiles/baseloader/mail-1.4.1.jar)
With javax.mail.jar 1.5.2, you get expected error:
javax.mail.internet.AddressException: Domain ends with dot in string ``your_email@your_domain''
      at javax.mail.internet.InternetAddress.checkAddress(
javax.mail.internet.AddressException: Quote not at start of local address in string ``Just"not"your_email2@your_domain''
      at javax.mail.internet.InternetAddress.checkAddress(

your_email..@your_domain (consecutive dots) is considered to be a valid address by 1.5.2. Save the Edit Validate rule ValidEmailAddress to higher ruleset and take care of this specific scenario.
JavaMail API supports JDK 1.5 or later and therefore you can place it in classpath ahead to the one picked up from database -
              select * from pr_engineclasses where pzjar like 'base\mail-1.4.1.jar'


Perform the following local-change: 
1. Out of three email IDs that doesn't conform to RFC822, two of them is fixed in higher version of JavaMail 1.5.2. Place it in classpath ahead to the one picked from the below record. 

               select * from pr_engineclasses where pzjar like 'base\mail-1.4.1.jar'
This is an extract JAR and therefore, it is download to your directory, apache-tomcat-7.0.42\work\Catalina\localhost\prweb\extractedFiles\baseloader
2. Add the JAR file (javax.mail.jar) in to the filesystem in a location where server is able to access it.
The actual location depends on how “locked down” server is, for example: whether you have J2EE security setup and some other factors. You must work with your server administrators to determine the best location for placement of third party JARs, so that the application server JVMs is able to pick these.

3. Once you have the JAR in the filesystem, you must add or update two Dynamic System Settings in PRPC as shown below. Note that the name pattern of these DSS rules is vastly different (yet correct):  
RuleSet:               Pega-Engine
Purpose:              prconfig/classloader/classpath/default
Value:                   (full path to jar file)
RuleSet:               Pega-RULES
Purpose:              compiler/defaultPaths
Value:                   (full path to jar file)
4. The third email ID - your_email..@your_domain
has consecutive periods which is not handled in JavaMail 1.5.2 and you must customize EditValidate rule ValidEmailAddress to include required validation and save it in the later ruleset.


Published January 31, 2016 - Updated October 8, 2020

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