Question

I have the following code to mail

#!perl
use MIME::Lite;
open (LOG_FILE, '>Mail_Log.txt');
print LOG_FILE "  creating mail\n";
    $msg = MIME::Lite->new(
    From =>'me@mine.com',
    To =>'me@mine.com',
    Subject =>'Congrats',
    Data =>"some messgae."
);
print LOG_FILE "  attaching to mail\n";
$msg->attach
(
    Type=>'TEXT',
Path=>'Log.txt',
Filename=>'log File.txt',
    Disposition => 'attachment'
);
print LOG_FILE "  sending the mail\n";
$msg->send( "smtp", "mailout.server.com" );
print "message sent successfully";
print LOG_FILE "  mail sent\n";

The above code works fine in my local. :) I am able to send and receive mails.

I converted this Perl(.pl) file executable(.exe) using PerlPackager(pp), and transferred this to my windows server where it should actually perform the function. But the execution is stopping after

print LOG_FILE "  creating mail\n";

As i can see the log written on to the Mail_Log.txt.

Help me in solving this.

Thanks in advance. :)

Was it helpful?

Solution

You didn't say you have any error messages but this thread may be helpful: Missing MIME\types.db from pp-generated code

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top