blacksmith has asked for the wisdom of the Perl Monks concerning the following question:
Argument "him@here.com','C:/test1.txt" isn't numeric in array element at C:\SCRIPTS\hash.pl line 27.
print() on closed filehandle Symbol::GEN1 at C:/Perl/site/lib/Mail/Sen +der.pm lin e 1229. print() on closed filehandle Symbol::GEN1 at C:/Perl/site/lib/Mail/Sen +der.pm lin e 816. print() on closed filehandle Symbol::GEN1 at C:/Perl/site/lib/Mail/Sen +der.pm lin e 832. print() on closed filehandle Symbol::GEN1 at C:/Perl/site/lib/Mail/Sen +der.pm lin e 921. print() on closed filehandle Symbol::GEN1 at C:/Perl/site/lib/M ail/Sender.pm line 1246. print() on closed filehandle Symbol::GEN1 at C:/Perl/site/lib/Mail/Sen +der.pm lin e 1248. readline() on closed filehandle Symbol::GEN1 at C:/Perl/site/lib/Mail/ +Sender.pm line 1250.
Here is the code.'him@here.com','C:/test1.txt' 'her@there.com','C:/test3.txt' 'it@where.com','C:/test2.txt','C:/test1.txt'
One last thing, the first email address is sent an email with the proper attachments. Thanks.#!c:/perl -w use Mail::Sender; my $time = localtime; my $subj_line = "Price Change Worksheet for $time"; my $work = 'me@work.com'; open(LIST, "c:/email.txt") or die $!; my @files; while(<LIST>) { s/^'//; s/'\n?$//; @files = split /','/, $_; my $email = shift @files; my $sender = new Mail::Sender( {smtp => 'mail.domain.com',from => $wor +k}) || die "$Mail::Sender::Error\n"; $sender->OpenMultipart( {to => $email, subject => $subj_line}); $sender->Body; $sender->SendLine('Here are the price change worksheets.'); $sender->SendFile( {description => 'Text File', encoding => 'Base64', file => \@files}) and print "Mail was sent OK." || die "$Mail::Sender::Error\n"; $sender->Close; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Email program with attachments
by $code or die (Deacon) on Oct 09, 2001 at 03:49 UTC | |
by blacksmith (Hermit) on Oct 09, 2001 at 23:02 UTC | |
by $code or die (Deacon) on Oct 10, 2001 at 00:11 UTC | |
by blacksmith (Hermit) on Oct 10, 2001 at 01:06 UTC | |
|
Re: Email program with attachments
by tstock (Curate) on Oct 08, 2001 at 23:08 UTC | |
by $code or die (Deacon) on Oct 09, 2001 at 03:06 UTC |