Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem attach file with perl mime

Status
Not open for further replies.

abruzzi

Programmer
Mar 27, 2007
17
FR
hello,

I've this script who must send a mail with joining a log file;
this script run good on windows,
on unix i've an error , the script attach the log file,but the log file is empty;
i don't understand why i'va no data in the joining log file or i've data in the log file;

my script
Code:
my $Message = new MIME::Lite 
   From => 'xx@xxx', 
   To => 'xxx@jj', 
   Cc => '', 
   Bcc =>'', 
   Subject =>'attach log', 
   Type =>'multipart/mixed',

Data => "
$message
";

$Messages->attr("content-type" => "text/html; charset=iso-8859-1");

if(-f $file)
{

attach $Messages 
   Type =>'TEXTE/log', 
   Path => 'prod.log', 
   Filename => 'prod.log'; 

}

$Messages->send;

thanks
 
Maybe you've checked this already, but the script is in the same directory as the log file?
 
yes he is in the same directory
i find the problem, it's run good

if i want to send another mail to another person with another subject,
i must declare a new
my $Message = new MIME::Lite
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top