--oops! sorry. --the example i MEANT to send was this:
[example:] open (INFILE, ">infile") || die("die trying: $!"); print INFILE `/usr/bin/psql -U web -f /home/make.test database`; if ($web) { open MAIL, ">-"; } else { open MAIL, "|/usr/lib/sendmail" || print "nope, can not send mail\n"; $addr='[EMAIL PROTECTED]'; print MAIL <<EOF From: "HMP Server" To: $addr Date: $date Sub: THIS IS IMPORTANT Mime-Version: 1.0 Content-type: multipart/mixed; Bountary="$boundary" Content-Disposition: inline --$boundary Content-type: text/html; charset=us-ascii Content-Disposition: inline <h2>This is an example file</h2> <b> <p>Something in the water, does not compute</b> <p> while (($email)=$result->fetchrow) print MAIL qq! $email <p> EOF } close INFILE; [/example] -X -----Original Message----- From: Paul Jasa [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 27, 2001 10:09 AM To: 'Bob Showalter'; [EMAIL PROTECTED] Subject: RE: Send e-mail attachment Good question. I think that is done so that you can write other things to the LETTER prior to mailing it? Paul -----Original Message----- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 27, 2001 8:02 AM To: Paul Jasa; [EMAIL PROTECTED] Subject: RE: Send e-mail attachment Importance: High > -----Original Message----- > From: Paul Jasa [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 27, 2001 9:53 AM > To: 'paul beckett (JIC)'; [EMAIL PROTECTED] > Subject: RE: Send e-mail attachment > > > Paul, > one of my favorite lines in my scripts is: > > open LETTER, "|mailx -s "SUBject Here!!" someone\@somewhere.com < > /some/file"; I don't understand this code. What do you do with LETTER? It should be a pipe to mailx stdin, but you've redirected that, so writes to LETTER don't go anywhere, do they? Why not just use system()? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]