SuccessInMind wrote:
> 
> I must admit I do not have must experience (yet) with Mimes and using the
> different Content-Type so If someone can offer assistance on this one I
> would be gratefull.
> 
> I want to convert this code to send a ZIP attachement without having to use
> any other external, modules if possible. I want the code to be used on any
> Unix server using the basic OS copnfiguration with Perl 5.0 or greater. I
> think I need to use something like either Mime Base64 or uuencode but I am
> not sure as to where to make the changes in the code.
> 
> This code will send a TEXT file attachement - I would like to send a ZIP
> file instead. Does anyone have any simple solutions?
> 
> open (MAIL, "|$SENDMAIL -oi -t");
> print MAIL "From: $ReplyFrom\n";
> print MAIL "To: $supportE\n";
> print MAIL "Subject: $data{'subject_email'}\n";
> print MAIL "MIME-Version: 1.0\n";
> print MAIL "Content-Type: multipart/mixed; "."boundary=\"8=--\"\n";
> print MAIL "\n";
> print MAIL "--8=--\n";
> print MAIL "\n";
> print MAIL "$VAR{'bodyUserinfo'}\n";
> print MAIL "\n";
> print MAIL "--8=--\n";
> 
> print MAIL "Content-Type: text/plain; ".    "charset=us-ascii\n";   print
> MAIL "Content-Disposition: attachment; ".    "filename=\"wsr-pro.txt\"\n";
> 
> print MAIL "\n";
> 
> if (open CONF,"<wsr-pro.conf") {
> while (<CONF>) { print MAIL }
> close CONF;
> print MAIL "\n";
> print MAIL "\n";
> }
> 
> =================
> 
> Any clues?

There is a script and module on my Tripod site that will help you.  You can 
incorporate them together if you have to avoid a module.  zThe example is 
attaching a gif, but a zip is just another mime-type.  Personally I 
would use MIME::Lite.

-- 
  ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
 (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED] 
  / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to