jeevs wrote:
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;

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

Yes, you have used a complete HTTPS URL when just a server name or
address is required. Your provider will give you details of their SMTP
server, but it is likely to be something like 'smtp.cybage.com'. It's
also likely that you have to provide a username and password to use it.

HTH,

Rob

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


Reply via email to