Perl: Send an Email with attachment through Gmail SMTP

This is a tutorial on how to send an email with attachment via Gmail SMTP. Here i am using Email::MIME to create the email/message object. Email::Sender::Simple (sendmail) is used to send the mail with the help of secure transport provided by Email::Sender::Transport::SMTP::TLS. The sample script below sends an email with two attachments and a text/html