· 7 years ago · Sep 13, 2018, 10:54 PM
1Can I safely store passwords inside the source of a CGI script?
2use strict;
3use warnings;
4use Email::Send::SMTP::Gmail;
5my $mail = Email::Send::SMTP::Gmail->new(
6 -smtp => 'gmail.com',
7 -login => 'whateveraddress@gmail.com',
8 -pass => 'whatever_pass'
9);
10$mail->send(
11 -to => 'target@xxx.com',
12 -subject => 'Hello!',
13 -charset => 'KOI8-R',
14 -verbose => '1',
15 -body => 'Just testing it',
16 -attachments => 'full_path_to_file'
17);
18$mail->bye;