The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Email::Send::SMTP::Gmail - just send emails with attachments using Google's SMTP


                 use strict;
                 use warnings;

                 use Email::Send::SMTP::Gmail;

                 my $mail=Email::Send::SMTP::Gmail->new( -smtp=>'',

                            -body=>'Just testing it',



Simple module to send emails through Google's SMTP with or without attachments. You can use from your Gmail account or your email if you are using Gmail to your domain. It supports basic functions such as CC, BCC, ReplyTo.

new(-login=>'', -pass=>'' [, -debug=>''])

It creates the object and opens a session with the SMTP.

send(-to=>'', [-subject=>'', -cc=>'', -bcc=>'', -replyto=>'', -body=>'', -attachments=>''])

It composes and sends the email in one shot

to, cc, bcc: comma separated email addresses
attachments: comma separated files with full path

Close the SMTP session


Please report any bugs or feature requests to bug-email-send-smtp-gmail at or through the web interface at We will be notified, and then you'll automatically be notified of progress on your bug as we make changes.


Martin Vukovic, <mvukovic at>

Juan Jose 'Peco' San Martin, <peco at>


Copyright 2010 Microbotica

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


You can find documentation for this module with the perldoc command.

    perldoc Email::Send::SMTP::Gmail

You can also look for information at: