Solved

Email from Perl with NT

Posted on 1998-12-03
3
137 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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

690 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