Verifying Invalid Email Ids through UiPath

Hi Team,

Is there a way to find Invalid email ids and Domain Id’s before sending emails using SendOutlook or Send Exchange Email Message.

Appreciate your response.

1 Like

Hi @RajeshT,
You may use Regex to validate your Email before sending mails to it.
Check this post.
https://forum.uipath.com/t/check-format-of-email-adddress/20344/7?u=abhishek07

1 Like

Hi @Abhishek07

What could be the expectation if i provide the input from excel sheet as below:

As getting false as result.
image

1 Like

@RajeshT - Use "
/^(([^<>()\.,;:\s@"]+(.[^<>()\.,;:\s@"]+)*)|(".+"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/" to validate email address.

1 Like

Hi buddy,

See the link: https://go.uipath.com/component/email-validation-activity

Or use the activity https://www.nuget.org/packages/Uipath.Email.Validation.Activities

Or you can use regex match to check mail address.
use “Is Match” activity
In Properties**

  1. input ->“abc@xxx.yyy
    2.Pattern ->”^([\w.-]+)@([\w-]+)((.(\w){2,3})+)$"
    3.Result->(Boolean value)
1 Like

Hi
Yah of course we got many criteria to consider
—first one is special characters before @ symbol in email id
If the email is stored in a variable of type string named str_emailid
To validate that we can use a assign activity like this
str_valid = Split(str_emailid.ToString,”@“)(0).ToString

Now use a IF condition like this
System.Text.RegularExpressions.Regex.IsMatch(str_valid.ToString,”(\W)”)

Which will check for any special characters in the email and if it’s there it goes to THEN Part where we can neglect those email ids as it won’t be accepted as mail address
Or it goes to ELSE part if it’s correct

Cheers @RajeshT

2 Likes

Hi @Palaniyappan I have created the flow validating the correct email id’s and Incorrect email id’s ,but i need to copy these in to excel separately valid and invalid email id’s.

How can i proceed further from If condition ,attached the worflow.
Invalid Email IDs and Send Valid Email’s.xaml (8.5 KB)

1 Like

@RajeshT use write cell activity for valid and invalid email.

1 Like

Thank you @Palaniyappan @kalpitmantri @batBot

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.