Skip to main content
vempatir680997
April 18, 2023
Question

How to find Wrong email in process model

  • April 18, 2023
  • 7 replies
  • 0 views

How to find the wrong email address when we are fetching data from the DB?

(I am fetching employe's Data from DB, after fetching the data I need to send the mail notification to those Employ's, but "I don't want to send the email notification whose gave me the wrong email format or wrong email in process model Also I need to find the invalid email id") 

Can Anyone help me for this,

7 replies

harshitb6843
April 18, 2023

The format can be checked but not the authenticity of the email. You can check the email using the below regex. 

^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$

vempatir680997
April 18, 2023

But i Want to Use it in PM Is it possible to differentiate the unveiled mail-id from PM

harshitb6843
April 18, 2023

You can create an expression rule that accepts the email as input in the text type RI and then call that expression to rule in the script task. 

Another thing. This will tell you that harshitbumbgmail.com is invalid but it won't tell you that if harshitbumb@gmail.com exists or not. 

For that, you need an external third-party service. 

April 18, 2023

FWIW, validateemailaddress() function in People Function plugin covers most of the cases. But still if you have some edge cases then you need to create your own regex to validate the email

vempatir680997
April 18, 2023

is this possible to use the validateemailaddress() in PM

April 18, 2023

Yes call it inside the Script Task.