Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    
    eval { $sender->send($email) };
    die "Error sending email: $@" if $@;
    
  2. or download this
    # mostly cribbed from Email::Send::SMTP
    sub send {
    ...
            || croak(
            'Email::Send::Gmail: error connecting to server smtp.gmail.com
    +');
    ...