Solved

Email from Perl with NT

Posted on 1998-12-03
3
135 Views
Last Modified: 2010-03-04
I want to send an email from a perl script using NT, how do I facilitate this?  I have access to an SMTP mailer (exchange) on my network.  

0
Comment
Question by:lweiner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:lweiner
ID: 1206710
Adjusted points to 110
0
 
LVL 5

Accepted Solution

by:
b2pi earned 110 total points
ID: 1206711

perldoc Net::SMTP  will show (after some intro)

use Net::SMTP;

$smtp = Net::SMTP->new('mailhost');
$smtp->mail($ENV{USER});
$smtp->to('postmaster');
$smtp->data();
$smtp->datasend("To: postmaster\n");
$smtp->datasend("\n");
$smtp->datasend("A simple test message\n");
$smtp->dataend();
$smtp->quit;

Additionally, you can take a look at higher level interfaces at

perldoc Mail::Mailer
perldoc Mail::Send


0
 
LVL 5

Expert Comment

by:b2pi
ID: 1206712
You know, if I'd noticed you gave a B on this one, I would have let your other one ride.  For a proper, complete answer, one generally gives an A (how do you know? Take a look at the grading histories of any of the top 15)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question