Hi,

Given that this perl code will send a TEXT attachement how can I
modify this coe to send GIF image instead?

  open (MAIL, "|$mailprog -oi -t");
  print MAIL "From: $admin\n";
  print MAIL "To: $admin\n";
  print MAIL "Subject: The image you have order\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 "$body\n";
  print MAIL "\n";
  print MAIL "--8=--\n";
  print MAIL "Content-Type: text/plain; ".
"charset=us-ascii\n";   print MAIL "Content-Disposition:
attachment; ".    "filename=\"myfile.txt\"\n";
  print MAIL "\n";
  if (open FILE,"<$myfile") {
    while (<FILE>) { print MAIL }
    close FILE;
  }
  print MAIL "\n";

==============================

Any assistance is appreciatted.

Normand Charette
PathFinder Software

_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to