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

NAME

Haineko::SMTPD::RFC5321 - Tools related RFC-5321

SYNOPSIS

    use Haineko::SMTPD::RFC5321;
    my $x = Haineko::SMTPD::RFC5321->is8bit( \$string );
    my $y = Haineko::SMTPD::RFC5321->check_ehlo( $ehlo_hostname );

CLASS METHODS

is8bit( \$string )

is8bit() returns whether $string contains non-ascii character or not.

    my $x = 'Stray cat';
    my $y = '野良猫';
    my $z = 'villast köttur';

    print Haineko::SMTPD::RFC5321->is8bit( \$x );  # 0
    print Haineko::SMTPD::RFC5321->is8bit( \$y );  # 1
    print Haineko::SMTPD::RFC5321->is8bit( \$z );  # 1

check_ehlo( EHLO-HOSTNAME)

check_ehlo() checks whether specified hostname is valid as EHLO-HOSTNAME or not.

    print Haineko::SMTPD::RFC5321->check_ehlo('[127.0.0.1]');      # 1(OK)
    print Haineko::SMTPD::RFC5321->check_ehlo('cat.example.jp');   # 1(OK)
    print Haineko::SMTPD::RFC5321->check_ehlo('');                 # 0(NG)
    print Haineko::SMTPD::RFC5321->check_ehlo('cat@example.jp');   # 0(NG)

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.