Perl Send Mail Script
Added by astuffedtiger on May 16, 2017 19:27
#!/usr/bin/perl
use strict;
use Mail::Mailer;

my $mailer = Mail::Mailer->new('smtp', Server => 'smtp.myserver.com');
$mailer->open( { 'To'      => 'me@mydomain.com',
                'Subject' => 'Test Message',
                'From'    => 'Me <me@mydomain.com>' } );
print {$mailer} "Hello world\n";
$mailer->close or die ("Couln't close: $!");

Comments