I've solved my earlier problem of getting my script to
output an encoded file to the mailwrapper. My only
problem is, I'm having real trouble getting mail
agents to see the attachment properly.
Using this script:
#!/usr/bin/perl
$fileout = `cat /home/www/schnarff/images/chili.jpg |
/usr/local/bin/base64
/home/www/schnarff/images/chili.jpg`;
$bound = "---bound";
open (MAIL, "|/usr/bin/sendmail -t");
print MAIL "To: alexlefevre\@yahoo.com\n";
print MAIL "Mime-Version: 1.0\n";
print MAIL "Content-Type: multipart/mixed;
boundary=\"$bound\"; charset=\"iso-8859-1\"\n";
print MAIL "$bound\n";
print MAIL "Content-Type: text/plain; format=flowed;
charset=iso-8859-1\n";
print MAIL "Content-Transfer-Encoding: 7bit\n";
print MAIL "Here is the attachment!\n";
print MAIL "$bound\n";
print MAIL "Content-Type: image/jpg;
name=\"chili.jpg\"\n";
print MAIL "Content-Disposition: attachment;
filename=\"chili.jpg\"";
print MAIL "Content-Transfer-Encoding: base64";
print MAIL "$fileout";
close MAIL;
Mail goes to Yahoo just fine, which shows that there's
an attachment on the Inbox screen. When I try to
access the message, though, there's nothing there --
not even my text. What could be the problem? I'm
taking the content-type, etc. from mail I sent using
sqwebmail.
Thanks,
Alex
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/