Check the validity of a domain in an email

Hi,

We are scraping data that includes a lot of email addresses. When the scraping fails to get the correct text of the domain, the process sort of fails when it sends email to an address that does not exist.

Is there any easy way of checking if a domain exist (through activity or code) ?

Thanks

@RayJay,

You can use the below regex to validate the domain name format using UiPath Regex IsMatch activity, but you need to validate the domain exist then you have to execute or call some third party tool only.

(?:[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]|[A-Za-z0-9])

We’re talking about checking if the domain exists or not. Was thinking that there were some activity for this or someone knew how to use some dns commands to get this info. Anyone? :slight_smile:

@RayJay,

Check this xaml, implemented with DNS, will return true or false for the domain which you are passing in.

DoGetHostEntry.xaml (6.4 KB)

Brilliant! Just what I needed!!!:+1:

1 Like

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