Я использовал этот скрипт для отправки текстового файла, письмо отправляется с вложением, но когда я открываю прикрепленный файл, он пустесть идеи почему?я что-то пропустил.спасибо
#!/usr/bin/perl -wl
my $msg = MIME::Lite->new(
From => 'xxx.net',
To => 'xxx.com',
Subject => 'Report',
Type => 'multipart/mixed',
)or die "Error creating multipart container: $!\n";
$msg->attach(
Type => 'TEXT',
Data => " Please check the attached file.",
)or die "Error adding the text message part: $!\n";
$msg->attach (
Type => 'text/plain',
Path => '/myfile/file1',
Filename => 'result.txt',
Disposition => 'attachment'
)or die "Error adding the attached file part: $!\n" ;
$msg->send;