Re: net::smtp

From: henry farbles (deladoalado_at_hotmail.com)
Date: 07/28/04

  • Next message: momena: "Re: writing to a pipe on win32"
    Date: Wed, 28 Jul 2004 00:40:28 GMT
    
    

    On Tue, 27 Jul 2004 22:07:21 GMT, RandRace <deladoalado@hotmail.com>
    wrote:

    >I'm having some problems with a little script i wrote using net::smtp.
    >I originally wrote it in linux where it works perfectly. I tried to
    >use it from windows the other day and it doesn't work. It connects to
    >the server and prints the banner but will not send mail.
    >Here is my script:
    >
    >use Net::SMTP;
    >
    >my $smtp = Net::SMTP->new('smtp.comcast.net') or die "Can't Open
    >server"!";
    >print $smtp->banner, "\n";
    >
    >$smtp->mail('mail@comcast.net');
    >$smtp->to('mail@comcast.net');
    >
    >$smtp->data();
    >$smtp->datasend("To: mail@comcast.net\n");
    >$smtp->datasend("From: somedude\n");
    >$smtp->datasend("Subject: dude\n");
    >$smtp->datasend("Reply-To: mail@comcast.net\n");
    >$smtp->datasend("\n");
    >$smtp->datasend("test test");
    >$smtp->dataend();
    >
    >$smtp->quit;
    >
    >thanks :)

    To follow up, i put "or die" after every line and the program seems to
    be failing at the dataend portion. Ive been messing around with it all
    day and cant seem to figure out what the problem is. Any help is
    appreciated. :)


  • Next message: momena: "Re: writing to a pipe on win32"

    Relevant Pages