Herb,
I tried you code and received errors:
Global symbol "$smtp" requires explicit package name at test1.pl line 6.
Global symbol "$smtp" requires explicit package name at test1.pl line 7.
Global symbol "$smtp" requires explicit package name at test1.pl line 8.
Global symbol "$smtp" requires explicit package name at test1.pl line 9.
Global symbol "$smtp" requires explicit package name at test1.pl line 12.
What am I doing wrong?
Thanks
Frank
-----Original Message-----
From: Herb Hall [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 7:40 AM
To: [EMAIL PROTECTED]
Subject: RE: Email on Windows Platform
I have had great success with Net::smtp. I also converted Matt Wrights ever
popular FormMail.pl to use this module. Here is a small sample of how
Net::smtp works:
use Net::SMTP;
$smtp = Net::SMTP->new('mail.cyber-quest.com'); # Change this to
your mail
server
$smtp->mail('[EMAIL PROTECTED]'); # Sender's address
$smtp->to('[EMAIL PROTECTED]'); # recipient's
address
$smtp->data();
# Send the header.
$smtp->datasend("To: beginners-cgi\@perl.org\n");
$smtp->datasend("CC: [EMAIL PROTECTED]\n");
$smtp->datasend("From: \"Herb Hall\" <perl\@cyber-quest.com>\n");
$smtp->datasend("Subject: How to send mail from perl\n");
$smtp->datasend("\n");
# Send the body.
$smtp->datasend("Message body text\n");
$smtp->datasend("More Message body text\n");
$smtp->dataend();
$smtp->quit;
---
Herb Hall
Web Developer/Programmer
Cyber-Quest, Inc.
[EMAIL PROTECTED]
> -----Original Message-----
> From: Nunya Business [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 05, 2001 11:14 PM
> To: [EMAIL PROTECTED]
> Subject: Email on Windows Platform
>
>
> Hello -
>
> I'm wondering how you go about taking info from a html form
> and have it
> emailed to a recipient when the server hosting the web page
> is a Windows
> machine. I know that on a *nix machine you can invoke the
> sendmail program,
> but how do you do it on say Win2K server?
>
> Thanks in advance,
> Brian
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>