Great Circle Associates Majordomo-Users
(February 2000)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: email validator
From: Jack Schnapper <jack @ kajor . com>
Date: Mon, 07 Feb 2000 07:39:47 -0500
To: Clay Irving <clay @ skechers . com>
Cc: majordomo-users @ GreatCircle . COM
In-reply-to: <20000204174715.D2312@ratchet.skechers.com>
References: <Pine.GSO.4.21.0002041346590.21809-100000@lepton.etown.com><Pine.GSO.4.21.0002041346590.21809-100000@lepton.etown.com>

I am rather a neophyte when it comes to perl.  Where would I insert this
module?

Thanks,
Jack

At 05:47 PM 2/4/00 -0800, Clay Irving wrote:
 
>On Fri, Feb 04, 2000 at 01:47:35PM -0800, ramon via lepton wrote:
>
>> Does anyone have a working email validator for majordomo lists?
>
>I use the Perl module Email::Valid to weed out obvious bad addresses:
>
>#!/usr/local/bin/perl
>
>use Email::Valid;
>
>$input_file     = "foo.txt";             # Input file
>$good_addresses = "good.txt";            # File to store good addresses
>$bad_addresses  = "bad.txt";             # File to store bad addresses
>
>open F, "$input_file" or die "$!\n";
>open G, ">$good_addresses" or die "$!\n";
>open R, ">$bad_addresses" or die "$!\n";
>
>while ($address = <F>) {                 # Read the list of Email addresses
>  chomp $address;
>  $address =~ s/^\s+//;                  # Remove spaces in the Email address
>  $valid = new Email::Valid;
>  if ($valid->address( -address => $address)) {
>    print G "$address\n";                # The address is valid
>  } else {
>    print R "$address\n";                # the address is not valid
>  }
>}
>
>-- 
>Clay Irving
>clay@skechers.com



Follow-Ups:
References:
Indexed By Date Previous: Re: abort message (mj_resend)
From: "Todd A. Lyons" <cannonball@usinter.net>
Next: Re: Address/Name problems
From: Ian Douglas <idouglas@woodvale.on.ca>
Indexed By Thread Previous: Re: email validator
From: Clay Irving <clay@skechers.com>
Next: Re: email validator
From: ramon via lepton <ramon@etown.com>

Google
 
Search Internet Search www.greatcircle.com