
prsnlty
Deleted
Apr 7, 2000, 7:40 PM
Post #1 of 3
(297 views)
|
|
How to make script send "contents" of a text file
|
Can't Post
|
|
Hello :-) First let me explain that I have a script I had custom written for me. I have modified it to send an auto-response via email to the person filling out our form. The problem I'm having is that it sends the correct text file but in name only. It does not send the contents of the file in the body of the email as I had hoped it would the only thing in the body is the file name: "LFS!_conformation.txt". My question: What am I missing here? Everything works like a dream with this one exception. This is the portion of the script code to send the mail: # tell-a-friend sub mailto { if ($to) { open (MAIL, "|$sendmail -t") | | &error('sendmail'); # open (MAIL, ">&STDOUT"); # print MAIL "Content-Type: text/html\n\n"; # print MAIL "<HTML><PRE>\n"; print MAIL "To: $to\n"; print MAIL "From: $from\n"; print MAIL "Date: $date\n"; print MAIL "Subject: $contents{'LETTERID'} \-\- $contents{'SEND'}\n"; print MAIL "\n"; @out = split(/\\n/, $contents{'CONFORMATION'}); foreach $out (@out) { print MAIL $out; } print MAIL "\n\n"; # print MAIL "</PRE></HTML>\n"; close (MAIL); } }
|