Question: How can I send mail to Gmail using Perl? Here's what I'm trying:

```
my $mailer = Email::Send->new(
    {
        mailer      => 'SMTP::TLS',
        mailer_args => [
            Host     => 'smtp.gmail.com',
            Port     => 587,
            User     => 'xxx',
            Password => 'xxx',
        ]
    }
);

use Email::Simple::Creator;    # or other Email::

use File::Slurp;
@arrIrc = read_file("$ircFile");
my $email = Email::Simple->create(
    header => [
        From    => 'xxx',
        To      => "$configList{email}",
        Subject => "The summary of logfile $channelName",
    ],
    body => "@arrIrc",
);

```

Answer: 
Use [Net::SMTP::SSL](http://search.cpan.org/perldoc/Net::SMTP::SSL) to talk to GMail.

See [MIME::Lite inline images](http://www.perlmonks.org/?node_id=784574) on [Perlmonks](http://www.perlmonks.org) for an example.
You can use [MIME::Lite](http://search.cpan.org/perldoc?MIME::Lite) to compose a message, which you then send to your local sendmail process. However, in order to talk to gmail's servers you need to [have SSL certificates set up](http://download.gna.org/hpr/fetchmail/FAQ/gmail-pop-howto.html). There's probably more detailed instructions for that on [superuser](http://superuser.com).