Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: getting SMTP failure codes

by e5z8652 (Novice)
on Feb 05, 2010 at 18:07 UTC ( [id://821622]=note: print w/replies, xml ) Need Help??


in reply to Re^2: getting SMTP failure codes
in thread getting SMTP failure codes

For some reason I was thinking that if I looped on them that it would take longer. But I timed it and the results are about the same (at least on my network & mail server). If recipient() is doing the same thing, then of course it wouldn't matter. (And I should have been able to figure that out from the debug output anyway!)

So populating an array with the addresses, and then running a foreach loop on the array of addresses would get me where I want to go.

Thanks for the clue!

Replies are listed 'Best First'.
Re^4: getting SMTP failure codes
by Anonymous Monk on Feb 06, 2011 at 20:40 UTC
    How do i run this script on a root, i mean what command to use
Re^4: getting SMTP failure codes
by Anonymous Monk on Feb 06, 2011 at 20:44 UTC
    How do i run this script on a root ?
    #test_mail.pl use Net::SMTP; $smtp = Net::SMTP->new( Host => '192.168.55.173', Debug => 1, ); $smtp -> mail("root\@test-server.my.home"); @good = $smtp -> recipient('good_address@my.home','bad_address@my.home +',{ SkipBad => 1, Notify => ['FAILURE']}); $smtp -> data(); $smtp -> datasend("TO: good_address@my.home\n"); $smtp -> datasend("TO: bad_address@my.home\n"); $smtp -> datasend("SUBJECT: Test e-mail from root\n"); $smtp -> datasend("\n"); $smtp -> datasend("A test message.\n"); $smtp -> dataend(); print "These addresses went: @good\n"; $smtp -> quit();

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://821622]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-20 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found