email - Perl MIME::Lite bad file descriptor -


this code far:

#!/usr/bin/perl use strict; use warnings; use mime::lite;  $to = 'example@asd.com'; $from = 'example@asd.com'; $subject = 'test email'; $message = 'this test email sent perl script';  $msg = mime::lite->new(                  => $from,                    => $to,              subject  => $subject,              data     => $message              );  $msg->add( "type" => "multipart/mixed" );         $msg->send("smtp", "good.domain.net"); print "email sent successfully\n"; 

when want run script got following error:

failed connect mail server: bad file descriptor @ ...\email.pl line 17.

i have no idea problem be. has idea how fix this?

edit: corrected code above, working proper server (it not require authentication @ all).

mime::lite smtp debugging procedure

try narrow search problem.

1: smtp greeting message when telnet smtp host?
telnet mail.domain.net 25

1:yes => add debug option mime::lite send (via smtp) call.

$msg->send("smtp", "mail.domain.net", debug=>1, authuser=>'myname@domain.com', authpass=>"password" ); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -