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 > Re: Email from ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 10612 of 11948
Post > Topic >>

Re: Email from windows

by rob.dixon@[EMAIL PROTECTED] (Rob Dixon) Feb 6, 2008 at 12:39 PM

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('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;
> 
> $####################

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
 



 2 Posts in Topic:
Re: Email from windows
rob.dixon@[EMAIL PROTECTE  2008-02-06 12:39:08 
Re: Email from windows
krahnj@[EMAIL PROTECTED]   2008-02-06 05:36:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Tue Oct 7 16:24:38 CDT 2008.