mecrazycoder has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, Good Morning to all.I am using perl2exe for converting pl to exe files.The problem that i encountered now is pretty different.I am trying to convert script(for sending mail with attachment) into exe using perl2exe.But after converting i am getting error like Cannot find SASL connection library at PERL2EXE_STORAGE/NET/SMTP.pm. Here is the script that i created
use warnings; use strict; use MIME::Lite; our $user = "username\@yahoo.in"; our $pass = "password"; our $attachmentname=$ARGV[0]; our $to = "username\@yahoo.in"; our $from = "username\@yahoo.in"; our $subject = "Hi buddy"; our $message = "Here is the attachment"; emailToSend($to, $from, $subject, $message); sub emailToSend { local ($to, $from, $subject, $message) = @_; my $msg = MIME::Lite->new( From => $from, To => $to, Subject => $subject, Data => $message ); $msg->attach(Type => 'image/gif', Id => 'GDIPlus_Image.gif', Path => 'images.zip', ); MIME::Lite->send('smtp', 'smtp.mail.yahoo.com:25', Timeout => 30, AuthUser=>$user, AuthPass=>$pass); $msg->send(); }
Please kindly help.Is there any other way to create exe.I tried Par but i dont find in ppm.I am using activestate-windows server2008.

Replies are listed 'Best First'.
Re: Problem with perl2exe
by marto (Cardinal) on Sep 01, 2009 at 09:15 UTC
      The error message comes directly from Net::SMTP, it is complaining it can't find any plugins like Authen::SASL::Perl::GSSAPI, probably because they aren't included by perl2exe.
        But there is no Authen::SASL::Perl::GSSAPI included in authen-sasl v.2.12 and usage of: use Authen::SASL::Perl::GSSAPI; is giving an error before compilation...
Re: Problem with perl2exe
by Anonymous Monk on Sep 01, 2009 at 07:34 UTC
    You need to add something like
    use Authen::SASL::Perl::ANONYMOUS; use Authen::SASL::Perl::CRAM_MD5; use Authen::SASL::Perl::DIGEST_MD5; use Authen::SASL::Perl::EXTERNAL; use Authen::SASL::Perl::GSSAPI; use Authen::SASL::Perl::LOGIN; use Authen::SASL::Perl::PLAIN;
      Dude, tanx for ur immediate response.But i am still getting same error.Please help me
        You have to get this modules included, read perl2xe manual learn how
      Without adding above packages, i am still able to get output.But after converting to exe only i am getting error