Nesh has asked for the wisdom of the Perl Monks concerning the following question:
Now the problem is that when I use the commented line code instead of passing $recepient...it works fine and in the above case it does not. Can you help me in fixing this. Thanks#!/usr/bin/perl use warnings; use strict; use Net::SMTP; my $recepient = qq("nafroz\@sunamerica.com","sdas\@sunamerica.com"); print "$recepient \n"; my $smtp = Net::SMTP->new('smtp1.sunamerica.com'); $smtp->mail("nafroz\@sunamerica.com"); #$smtp->to("nafroz\@sunamerica.com" , "sdas\@sunamerica.com"); $smtp->to($recepient); $smtp->data(); $smtp->datasend("Subject: TEST MESSAGE\n"); $smtp->datasend("To: nafroz\@sunamerica\n"); $smtp->datasend("\n"); $smtp->datasend("Email test."); $smtp->dataend(); $smtp->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem in adress field for email script.
by GrandFather (Saint) on Jul 07, 2005 at 22:32 UTC | |
|
Re: Problem in adress field for email script.
by radiantmatrix (Parson) on Jul 07, 2005 at 22:55 UTC | |
|
Re: Problem in adress field for email script.
by tlm (Prior) on Jul 07, 2005 at 23:50 UTC | |
|
Re: Problem in adress field for email script.
by cajun (Chaplain) on Jul 08, 2005 at 03:12 UTC |