csorensen has asked for the wisdom of the Perl Monks concerning the following question:
script 2 - send the mailopen ADDLIST, "addlist" or die "can't open file: $!"; @names = <ADDLIST>; open NEWLIST, ">>emailist" or die "can't open file: $!"; foreach (@names) { if ( $_ =~ /([^\s\@]{1,}\@[^\s\@]{1,})/) { print NEWLIST $_; } }
$sendmail = "/usr/lib/sendmail -t"; open ADDRESS, "address.txt" or die "can't open file: $!"; @mail_to = <ADDRESS>; open BODY, "message.txt" or die "can't open file: $!"; $content = <BODY>; foreach (@mail_to) { open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"; print SENDMAIL "To: $_ \n"; print SENDMAIL "From: csorensen\@uptimeresources.net \n"; print SENDMAIL "Subject: South African tourism survey \n"; print SENDMAIL "Content-type: text/plain \n\n"; print SENDMAIL $content; close(SENDMAIL); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: pattern matching and sendmail issues
by lhoward (Vicar) on Jun 29, 2000 at 01:53 UTC | |
Re: pattern matching and sendmail issues
by btrott (Parson) on Jun 29, 2000 at 01:49 UTC | |
Re: pattern matching and sendmail issues
by t0mas (Priest) on Jun 29, 2000 at 10:02 UTC | |
by csorensen (Beadle) on Jun 29, 2000 at 21:09 UTC | |
Re: pattern matching and sendmail issues
by chromatic (Archbishop) on Jun 29, 2000 at 04:51 UTC | |
Re: pattern matching and sendmail issues
by Anonymous Monk on Jun 29, 2000 at 01:38 UTC | |
by csorensen (Beadle) on Jun 29, 2000 at 01:41 UTC |