net::smtp

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


Date: Tue, 27 Jul 2004 22:07:21 GMT

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 :)



Relevant Pages

  • Re: script not seeing files -- kind of long
    ... > server runs a custom database package that manages the backup of the CAM ... The Linux server is a central storage location for "working" CAM ... > The HP-UX server and Linux workstations all NFS mount an NFS export on ... > the script runs. ...
    (perl.beginners)
  • script not seeing files -- kind of long
    ... server runs a custom database package that manages the backup of the CAM ... The Linux server is a central storage location for "working" CAM ... the script checks for the existence of the files the HP-UX machine ... time the counter in the for loop reaches 10,000 the script sees the ...
    (perl.beginners)
  • Re: Will Linux become as vulnerable as MS ??
    ... > beeing vulnerable to viruses. ... > that they know are executable, and execute intentionally. ... >> Linux, each distro is a little different, and even within the distro, ... > Since clicking on a script is easier than typing it's name, ...
    (comp.os.linux.security)
  • Re: Multiple ssh tunnels limited to certain users
    ... script on the Linux server which automatically forwards the connection ... Shouldn't that script be the connecting user's shell? ... If you make the authorized_keys readonly for all users, that would be a great way to restrict access to servers behind the Linux box: an external party logs into the Linux box and starts a forward to "his" box behind it. ... But I know the principle of starting a command from authorized_keys: that's what I sometimes use on a SVN server. ...
    (comp.security.ssh)
  • Re: sending command to an AD server?
    ... i still prefer a tool on linux that will allow me to add new users ... just be able to send a command to the AD server, from linux, which is ... server, this script does a lot of things for us, including gathering ... telnet into AD to run the command. ...
    (microsoft.public.windows.server.active_directory)