Click to See Complete Forum and Search --> : using sendmail to send attachments


lindamoran
04-26-2005, 02:14 PM
What do I have to add to the code below in order to send an attachment named brochure.doc? It's an MS Word file.

open (MAIL, "|$mailprog -t") || die "BW message1: Cannot open the $mailprog program\n";
print MAIL "To: $in{'visitoremail'}\n";
print MAIL "Reply-To: $betterwayaddress\n";
print MAIL "From: $betterwayaddress\n";
print MAIL "Subject: Your brochure about How to Survive Your Diet\n\n";
print MAIL "hi";
close(MAIL);

purefan
09-13-2005, 01:32 PM
have you found an answer yet?
I want to allow the users of my site to send me image files but havent found how to attach files to sendmail

lindamoran
09-13-2005, 01:41 PM
I gave up. Now I let my users download the doc instead of emailing it to them.


Linda

Jeff Mott
09-13-2005, 05:04 PM
Easiest way is to use the MIME::Lite (http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm) module.

Sorry for not seeing this post 5 months ago. :o