Starky has asked for the wisdom of the Perl Monks concerning the following question:
My first point of confusion is about the Notify option. What does it do?The `recipient' method can some additional OPTIONS which is passed in hash like fashion, using key and value pairs. Possible options are: Notify => SkipBad => ignore bad addresses If `SkipBad' is true the `recipient' will not return an error when a bad address is encountered and it will return an array of addresses that did succeed.
However, what I'm really interested in is the SkipBad option.
I would like, as it says, to get back a list of addresses that did succeed.
However, a simple test:
returns#!/usr/bin/perl use Net::SMTP; my $smtp = Net::SMTP->new('rintintin.colorado.edu'); die "Ugh." unless defined $smtp; my @recipients = $smtp->recipient('collin.starkweather@colorado.edu',' +joe@flugwumpet.com', Notify => 1, SkipBad => 1); print "Recipients are [@recipients]\n";
(Note I also tried it without the Notify option.)What? ~/bin/test.pl Recipients are [0] What?
The first address I know to be good, the second bad. The PODs are fairly unambiguous. Is this just bad documentation? Has anyone else actually gotten this option to work? Am I totally misreading what seems to be a fairly straightforward statement of how it works?
Any help from someone who has either gotten this to work or positively knows whether it should work or not would be much appreciated.
Thanks in advance, brothers :-)
Edit Masem 2001-08-24 - PRE to CODE tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple Net::SMTP question
by dga (Hermit) on Aug 24, 2001 at 02:12 UTC | |
by Starky (Chaplain) on Aug 24, 2001 at 03:02 UTC | |
by Anonymous Monk on Aug 24, 2001 at 03:15 UTC | |
|
Re: Simple Net::SMTP question
by shotgunefx (Parson) on Aug 24, 2001 at 00:10 UTC | |
by Starky (Chaplain) on Aug 24, 2001 at 00:58 UTC | |
by shotgunefx (Parson) on Aug 24, 2001 at 02:28 UTC |