[sf-perl] perl Mime send timesout

Andrew Solomon andrew at geekuni.com
Mon Dec 1 09:09:40 PST 2014

I've found sending email very difficult on account of all the various hoops
to jump through to prove you're not spamming.

For MIME::Lite you also have this at the top of the docs

"MIME::Lite is not recommended by its current maintainer. There are a
number of alternatives, like Email::MIME or MIME::Entity and Email::Sender,
which you should probably use instead. MIME::Lite continues to accrue weird
bug reports, and it is not receiving a large amount of refactoring due to
the availability of better alternatives. Please consider using something

For my own projects I've used http://www.mailgun.com/ and it was very easy
(and the way I use it, very cheap too).

Hope that helps


On Mon, Dec 1, 2014 at 5:02 PM, Richard Reina <gatorreina at gmail.com> wrote:

> I have tried to get this to work using three different sets of SMTP
> settings. Each time the result is the same:
> # perl test_mime_simple.pl
> SMTP Failed to connect to mail server: Connection timed out
>  at test_mime_simple.pl line 18.
> Below is my attempt with gmail settings I have also tried with Port =>
> 465. I seem to not be able to connect with ANY smtp server despite having a
> working internet connection.  Any ideas would be greatly appreciated.
> Thanks
> #!/usr/bin/perl
> use MIME::Lite;
> $to = 'richard at rushlogistics.com';
> $cc = 'gatorreina at gmail.com';
> $from = 'gatorreina at gmail.com';
> $subject = 'Test Email';
> $message = 'This is test email sent by Perl Script';
> $msg = MIME::Lite->new(
>                  From     => $from,
>                  To       => $to,
>                  Cc       => $cc,
>                  Subject  => $subject,
>                  Data     => $message
>                  );
> $msg->send('smtp', "smtp.gmail.com", AuthUser=>"gatorreina at gmail.com",
> AuthPass=>"mypass" );
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm

Andrew Solomon

Mentor at Geekuni http://geekuni.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20141201/cfe0b216/attachment.html>

More information about the SanFrancisco-pm mailing list