Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Email from wind...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 10613 of 11989
Post > Topic >>

Email from windows

by jeevan.ingale@[EMAIL PROTECTED] (Jeevs) Feb 6, 2008 at 02:06 AM

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('jeevani@[EMAIL PROTECTED]
');
    $smtp->to('jeevani@[EMAIL PROTECTED]
');
    $smtp->data();
    $smtp->datasend('To: jeevani@[EMAIL PROTECTED]
');
    $smtp->datasend('From: jeevani@[EMAIL PROTECTED]
');
    $smtp->datasend("\n");
    $smtp->datasend("A simple test message\n");
    $smtp->dataend();
    $smtp->quit;

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




 2 Posts in Topic:
Email from windows
jeevan.ingale@[EMAIL PROT  2008-02-06 02:06:30 
Re: Email from windows
jeevan.ingale@[EMAIL PROT  2008-02-06 21:56:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 10:24:17 CDT 2008.