How to create send mail in pl.  Im using ActiverPerl, IIS 6, Win 2003.

Posted on 2007-03-23
Last Modified: 2010-03-05
How to create send mail in pl.  Im using ActiverPerl, IIS 6, Win 2003.
Question by:athan
  • 2
  • 2
LVL 28

Accepted Solution

FishMonger earned 50 total points
ID: 18784398

Expert Comment

ID: 18790636
sample code to send mail using Mail::SendEasy .

use Mail::SendEasy ;
my $mail = new Mail::SendEasy(
smtp => 'SERVER NAME' ,
user => 'USER NAME' ,
pass => 'PASSWORD',
) ;

my $status = $mail->send(
from => '' ,
from_title => 'hi' ,
reply => '' ,
error => '' ,
to => '' ,
cc => '' ,
subject => "TEST" ,
msg => "hi" ,
html => "<b>Frm perl script...</b>",
msgid => "0101" ,
anex => "D:/home/bin/kp.txt",  #attachment
) ;

if (!$status) { print $mail->error ;}

Author Comment

ID: 18792210
How do I install the SMTP? Do I need an SMTP server to run this?
LVL 28

Expert Comment

ID: 18794520
Net::SMTP is a core module, which means that it's included with Perl.  You would install MIME::Lite and/or Mail::SendEasy with Activestate's ppm utility.

ppm install Mime::Lite

ppm install Mail::SendEasy

Author Comment

ID: 18799440

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
perl search and replace 6 161
Perl 101 11 68
Perl modules on linux ec2 3 85
Is it true to say that Python is successor of Perl? 7 112
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.…
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 (…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now