#509678 libmail-rfc822-address-perl: validates email addresses that are RFC822 no compliant.

#509678#5
Date:
2008-12-24 16:04:23 UTC
From:
To:
Hi,
	This packages validates email addresses which contains non-ascii
chars. It also permits the use of the "|" in domain-part.

	The following perl script can be used to perform a simple test:

========================================================================
#! /usr/bin/perl

use Mail::RFC822::Address qw(valid validlist);

@addresses = (
	'á@example.com',
	'ü@example.com',
	'ñ@example.com',
	'a@|example.com'
);

$list = join (', ', @addresses);

print "Testing the \"valid\" function...\n";

foreach (@addresses) {
	if (valid($_)) {
		print "\t$_ is a valid address.\n";
	} else {
		print "\t$_ is NOT a valid address.\n";
	}
}

print "\nNow testing the \"validlist\" function...\n";

if (validlist($list)) {
	print "\t\"$list\" is a valid address list.\n\n";
} else {
	print "\t\"$list\" is NOT a valid address list.\n\n";
}

========================================================================

Best Regards,
Manolo Díaz