The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Haineko::SMTPD::RFC5322 - Tools related RFC-5322

SYNOPSIS

    use Haineko::SMTPD::RFC5322;
    my $x = Haineko::SMTPD::RFC5322->is_emailaddress( 'kijitora@example.jp' );
    my $y = Haineko::SMTPD::RFC5322->is_domainpart( 'example.jp' ):

CLASS METHODS

is_emailaddress( Email address )

is_emailaddress() checks whether the argument is valid email address or not.

    my $x = 'Stray cat';
    my $y = 'kijitora@example.jp';
    my $z = '';

    print Haineko::SMTPD::RFC5322->is_emailaddress( $x );  # 0
    print Haineko::SMTPD::RFC5322->is_emailaddress( $y );  # 1
    print Haineko::SMTPD::RFC5322->is_emailaddress( $z );  # 0

is_domainpart( Domain part)

is_domainpart() returns checks the argument is valid domain part or not.

    print Haineko::SMTPD::RFC5322->is_domainpart( 'kijitora' );    # 0
    print Haineko::SMTPD::RFC5322->is_domainpart( 'example.jp.' ); # 1
    print Haineko::SMTPD::RFC5322->is_domainpart( '' );        # 0

REPOSITORY

https://github.com/azumakuniyuki/Haineko

AUTHOR

azumakuniyuki <perl.org [at] azumakuniyuki.org>

LICENSE

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