# phpman > perldoc > CGI::Untaint::email

## NAME
    [CGI::Untaint::email](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3AUntaint%3A%3Aemail/markdown) - validate an email address

## SYNOPSIS
      use [CGI::Untaint](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3AUntaint/markdown);
      my $handler = [CGI::Untaint](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3AUntaint/markdown)->new($q->Vars);

      my $email = $handler->extract(-as_email => 'emailaddress');

## DESCRIPTION
    [CGI::Untaint::email](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3AUntaint%3A%3Aemail/markdown) input handler verifies that it is a valid RFC2822 mailbox format.

    The resulting value will be a [Mail::Address](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AAddress/markdown) instance.

## AUTHOR
    Tatsuhiko Miyagawa <<miyagawa@bulknews.net>>

    This library is free software; you can redistribute it and/or modify it under the same terms as
    Perl itself.

## SEE ALSO
    [CGI::Untaint](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3AUntaint/markdown), [Email::Valid](https://www.chedong.com/phpMan.php/perldoc/Email%3A%3AValid/markdown)

