Link to home
Start Free TrialLog in
Avatar of tzahi
tzahi

asked on

I need script for attaching files using sendmail?

I am using perl subroutine in order to sendmail
what should I change or add to this subroutine in order
to sendmail with attachment.

sub mailto
{
($To,$Su,$Bod)=@_;
local($sr)='mailto' ;
open(MAIL,"|/usr/lib/sendmail -t")||die(&logger($sr,"can not open process sendmail"));
print MAIL "To: $To\n";
print MAIL "From: someone\@tase.co.il\n";
print MAIL "Subject: ".$Su."\n\n";
print MAIL "".$Bod ;
close(MAIL);
}
I dont want to use package  as MIME:lite
Avatar of tzahi
tzahi

ASKER

Edited text of question
Avatar of tzahi

ASKER

Edited text of question
sendmail doesn't deal with attachments, per se.  It just sends the text you have given it. It is generally the job of one of the MIME packages to create attachments.  What is your objection to using a package?
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial