net::smtp

R

RandRace

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('(e-mail address removed)');
$smtp->to('(e-mail address removed)');

$smtp->data();
$smtp->datasend("To: (e-mail address removed)\n");
$smtp->datasend("From: somedude\n");
$smtp->datasend("Subject: dude\n");
$smtp->datasend("Reply-To: (e-mail address removed)\n");
$smtp->datasend("\n");
$smtp->datasend("test test");
$smtp->dataend();

$smtp->quit;

thanks :)
 
H

henry farbles

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('(e-mail address removed)');
$smtp->to('(e-mail address removed)');

$smtp->data();
$smtp->datasend("To: (e-mail address removed)\n");
$smtp->datasend("From: somedude\n");
$smtp->datasend("Subject: dude\n");
$smtp->datasend("Reply-To: (e-mail address removed)\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. :)
 
N

nobull

RandRace said:
I'm having some problems with a little script i wrote using net::smtp.

Have you considered putting Net::SMTP into debug mode so you can see
what it's doing? If you didn't know you could do that then perhaps
you are forgetting that when reading the documentation of a subclass
it is also necessary to consult the documentation of the parent
classes to find out its full set of features.

This newsgroup does not exist (see FAQ). Please do not start threads
here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top