Julia: attachment bei email

Beitrag lesen

hi,

hier der code:

use MIME::Lite;

open(MAIL, "|$sendmail -t") or die $!;

$msg = MIME::Lite->new(
                 From    =>$from,
                 To      =>$to,
                 Subject =>"Betreff",
                 Type    =>"multipart/mixed"
   );

$msg->attach(Type     =>"TEXT",
                 Data     =>"Here's the GIF file you wanted"
   );

$msg->attach(Type        =>"text/plain",
                 Path        =>"../shop/artikel/451201.a.txt",
                 Filename    =>"451201.a.txt",
   Disposition => "attachment"
   );

$msg->print(\*MAIL);

close(MAIL);