in reply to Re: Bad file descriptor with mail to Gmail using MIME::Lite.
in thread Bad file descriptor with mail to Gmail using MIME::Lite.

Thank you for the suggestion. I'd thought of that and tried the following:
use strict; use warnings; use Email::Send; use Email::Send::Gmail; use MIME::Lite; my $msg = MIME::Lite->new( From =>'bob@gmail.com', To =>'bob@gmail.com', Subject =>'test' ); my $sender = Email::Send->new( { mailer => 'Gmail', mailer_args=>[ username=>'bob@gmail.com',password=>'123456',] } ); eval { $sender->send($msg) }; die "Error sending email: $@" if $@;
I receive no error, but the code immediately returns to a prompt and no mail is sent. I am somewhat new to this and assume you suggested I patch the "send" part (which works with Email::Simple::Creator) to my existing MIME code. Correct? Thoughts?

Replies are listed 'Best First'.
Re^3: Bad file descriptor with mail to Gmail using MIME::Lite.
by Anonyrnous Monk (Hermit) on Jan 13, 2011 at 19:23 UTC
    ... Correct?

    Yes and no :)

    What I was thinking of was to replace Email::Simple::Creator with Email::MIME::Creator to create the msg, as the latter module is essentially the "multipart" extension of the former... from the same author, so chances are good that if Email::Simple::Creator works, the MIME variant might work, too.

      I had checked Email::MIME::Creator but it lists it as "obsolete do-nothing library." The "obsolete do-nothing part" scared me off. But I'll try it tonight as it's still listed as a module ...