Python Script to Validate Email Addresses Using validate_email_address Library in Terminal
631K views
Jun 3, 2025
Buy the full source code of application here:
View Video Transcript
0:00
uh hello guys welcome to this video so
0:02
in this video I will show you how to
0:04
validate emails inside
0:07
Python very simply uh using this third
0:10
party package uh so you just need to
0:13
install this package here by this
0:15
command here pip install uh validate
0:18
email address so this is actually the
0:20
module here so once you install this you
0:23
can safely use this module inside your
0:25
Python script so we have a two sets of
0:28
emails addresses right here you'll see
0:30
this one is invalid this one is valid
0:33
here because this add the rate sign is
0:36
after that we don't have the domain
0:38
that's why it's invalid so if I run this
0:39
script
0:43
here you will see it will return for the
0:47
first address it will be a valid email
0:49
address and for the second one it is
0:51
saying false so it's very easy to do uh
0:54
let me show you the script here
0:58
so first of all what you do right here
1:01
you simply first of all require the
1:03
package so we simply write here from
1:08
validate email address it actually
1:11
contains this function here which is
1:13
validate email
1:15
so in this way you first of all import
1:18
this package so after importing this
1:20
package we can actually validate a set
1:23
of email addresses so we can have you
1:26
can just declare a variable here where
1:28
you can store all the email addresses
1:30
that you want to
1:31
validate so after storing these inside
1:35
your uh variables right here now we can
1:38
safely call the function that we
1:41
imported which is this validate email we
1:45
can pass the first email and similarly
1:47
we can pass the second email to this
1:49
function
1:51
so it will either return true or false
1:53
depending upon whether the email is
1:54
valid or not so the first one as you can
1:56
see it's a valid email the second one is
2:00
not a valid email so it will return true
2:03
or false so as soon as I run this Python
2:06
script you will see it will return the
2:09
first one is a valid email and now the
2:12
second one is not a valid email so it
2:14
return false so in this easy way you can
2:16
validate your email
2:18
addresses easily inside Python using
2:21
this third party package you install the
2:23
package and now to use this it's very
2:26
easy you declare the email addresses
2:28
that you want to validate and then you
2:30
call this function which is validate
2:33
email so it will either return true or
2:36
false depending upon whether the email
2:38
is valid or not so this is actually the
2:41
package and uh thank you very much for
2:43
watching this video and also check out
2:45
my website free media tools.com uh which
2:48
contains thousands of tools
#Email