Solved

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

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

Accepted Solution

by:
FishMonger earned 50 total points
ID: 18784398
0
 
LVL 8

Expert Comment

by:nedfine
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 => 'abc@abc.com' ,
from_title => 'hi' ,
reply => 'abc@abc.com' ,
error => 'abc@abc.com' ,
to => 'abc@abc.com' ,
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 ;}
0
 

Author Comment

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

Expert Comment

by:FishMonger
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
0
 

Author Comment

by:athan
ID: 18799440
Thanks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

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…

838 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