use MIME::Lite; my $msg = MIME::Lite->new( From =>'some@one.com', To =>'realmail@gmail.com', #Cc =>'some@other.com, some@more.com', Subject =>'testing 1 2 3', Data =>"body thing, back slash n test\n, br ing test
thats it" ); $msg->send(); #this one is line 10 #### SMTP Failed to connect to mail server: Bad file descriptor at C:\Documents and Settings\Administrator\Desktop\perl experiments\mail sender.pl line 10 Press any key to continue . . . #### Uncaught exception from user code: SMTP Failed to connect to mail server: Bad file descriptor at C:\Documents and Settings\Administrator\Desktop\perl experiments\mail sender .pl line 12 at C:/strawberry/perl/site/lib/MIME/Lite.pm line 2865 MIME::Lite::send_by_smtp('MIME::Lite=HASH(0xc9b62c)') called at C:/straw berry/perl/site/lib/MIME/Lite.pm line 2574 MIME::Lite::send('MIME::Lite=HASH(0xc9b62c)') called at C:\Documents and Settings\Administrator\Desktop\perl experiments\mail sender.pl line 12 Press any key to continue . . .