melsterTEK
Programmer
Does anyone now how to use sendmail for sending an attached file? Is sendmail good for this purpose?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
$to= qq|$payer_email\nMIME-Version: 1.0\nContent-Type: multipart/alternative; boundary="_jkkdsffdsr4332432dlkjifewks_"|;
$from=$customer_service;
$subject="Thank You!";
$body= qq|--_jkkdsffdsr4332432dlkjifewks_
Content-Type: text/plain; charset="iso-8859-1"
Dear you
Thank you
--_jkkdsffdsr4332432dlkjifewks_
Content-Type: text/html; charset="iso-8859-1"
# you would insert/append file contents here instead of HTML
<html><body>
<p>Dear you<br />Thank you</p>
</body></html>
|;
open(MAIL, "|/usr/sbin/sendmail -t");
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n\n";
print MAIL "$body\n";
close(MAIL);