Net::SMTP

E

Erik Waibel

Hello,

I'm trying to send mail using the Net::SMTP module, but am having
difficulties. I'm not using Perl, I'm using "ccperl", which comes with
ClearCase. So I'm limited to the mail modules that came standard with the
installation: Mail::Mailer, Mail::Mailer::sendmail, Net::SMTP... Here's my
code:

use Net::SMTP;
sub send_mail
{
$send_to = '(e-mail address removed)';
$server = 'my_server.com';
$smtp = new Net::SMTP ('host', Hello=>$server);

$smtp->mail($ENV{USER});
$smtp->to($send_to);

$smtp->data();
$smtp->datasend("To: whomever");
$smtp->datasend("\n");
$smtp->datasend("Test");
$smtp->dataend();

$smtp->quit;
}

This is the error:

%cmd> ccperl cclibrpt.pl
"connect: The requested address is not valid in its context.
at cclibrpt.pl line 149"

The line being referred to is the $smtp = new... line
-- -------
Thanks,
Erik Waibel
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top