[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Email from Perl with NT

Posted on 1998-12-03
3
Medium Priority
?
141 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
  • 2
3 Comments
 

Author Comment

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

Accepted Solution

by:
b2pi earned 330 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
Six Sigma Control Plans
Suggested Courses

864 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