views:

63

answers:

0

I have a program that runs every 4 hours and I want it to send an email to me when it does. So I added this:

my $host = "smtp.central.cox.net";
my $message = MIME::Lite->new(
        From     => '*********',
        To      => '*********',
        Subject => 'KMZ Downloader',
        Data    => "Successful on $now_string"
    );
    MIME::Lite->send('smtp', $host);
    $message->send();

I also tried:

MIME::Lite->send('smtp', $host, AuthUser=>$user, AuthPass=>$pass);

It just sits for a long time and then gives me the error Failed to connect to mail server: unknown error