use strict; use warnings; use lib '/Users/SaumyaSingh/lib'; use MIME::Lite; my $user = "username"; my $pass = "pass"; MIME::Lite->send("smtp","smtp.mail.yahoo.com", AuthUser=>$user, AuthPass=>$pass,Port => 465, Debug => 1); my $msg = MIME::Lite->new ( From => 'saumya_mmmec@yahoo.com', To => 'saumya.singh@ndsu.edu', Data => "This is a test\n", Subject => "Test", ); $msg->send() #### MIME::Lite::SMTP>>> MIME::Lite::SMTP MIME::Lite::SMTP>>> Net::SMTP(2.31) MIME::Lite::SMTP>>> Net::Cmd(2.29) MIME::Lite::SMTP>>> Exporter(5.62) MIME::Lite::SMTP>>> IO::Socket::INET(1.31) MIME::Lite::SMTP>>> IO::Socket(1.30_01) MIME::Lite::SMTP>>> IO::Handle(1.27) MIME::Lite::SMTP: Unexpected EOF on command channel at /Users/SaumyaSingh/lib/MIME/Lite.pm line 2622 Failed to connect to mail server: Bad file descriptor at yahoo line 21