I want to send an email from my windows machine how can I do that with
the following code which throws an error
can't call method mail from an undefined value.

I guess it is the host name that I am providing is wrong ... Where can
I get the SMTP server.

######################

#!c:/perl/bin/perl.exe -w
use strict;
use warnings;
use Net::SMTP;

    my  $smtp = Net::SMTP->new('https://herald.cybage.com/exchange');
    $smtp->mail('[EMAIL PROTECTED]');
    $smtp->to('[EMAIL PROTECTED]');
    $smtp->data();
    $smtp->datasend('To: [EMAIL PROTECTED]');
    $smtp->datasend('From: [EMAIL PROTECTED]');
    $smtp->datasend("\n");
    $smtp->datasend("A simple test message\n");
    $smtp->dataend();
    $smtp->quit;

$####################


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to