Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help again...

Status
Not open for further replies.

sigal

IS-IT--Management
Jan 29, 2004
3
AR
I wrote this simple script for attaching a file
i recieve the e-mail but i do'nt get any file attachment - i recieve alot of junk letters instead.

where i go wrong?
thanks,
sigal



$mailprog = "/usr/lib/sendmail";
open (MAIL, "|$mailprog -t -oi -oem");
open (TEXT, "uuencode tst.txt tst.txt |");
while (<TEXT>) {
$User_mail_body .= $_;
}
close TEXT;

print MAIL &quot;To: $cgi_data{'emailAddrs'}\n&quot;;
print MAIL &quot;From: $cgi_data{'XX-email'}\n&quot;;
print MAIL &quot;Subject: $cgi_data{'XX-subject'}\n\n&quot;;
print MAIL &quot;$User_mail_body&quot;;
print MAIL &quot;\n&quot;;
close (MAIL);

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top