PurePerl Sendail Program
Free to Download
Foreword: Written with Pure Perl, this module can be used to send mail from any computer that has Perl installed.
By: Chrysanthus Date Published: 21 Jul 2016
Start with the equivalent if you are not using Windows OS.
This includes the module into the program.
$Mailsend::MAIL_FROM = '<email@example.com>';
This variable must be typed with its email address. This is the address to which an email will be sent to, by the email server if an error occurs in the transmission. It can be the same as one of the addresses in the From field.
@Mailsend::recipients = ('<firstname.lastname@example.org>','<email@example.com>');
This array must be typed with at least one of the recipients address.
$Mailsend::From = '"Bob Example" <bob\@example.org>';
This variable must be typed with one or more email addresses, separated by commas, in a string. In this heading you have just one email address. It is for the person (or people) who wrote the email.
$Mailsend::Cc = '<firstname.lastname@example.org>';
The presence of this variable is optional. A copy of the email can be sent to the address (or addresses).
$Mailsend::Bcc = '<email@example.com>';
The presence of this Blind Carbon Copy variable is optional.
$Mailsend::Subject = 'Welcoming the New Members';
This variable for the subject, must be present.
$Mailsend::Body = "something sometning sometning";
This variable, for the body of the letter, must be present. The string value can be very long.
This function must be used after the above has been typed. It sends the email to the email server (MSA, Mail Submission Agent), which sends the email to the destination. Returns 1 for success and 0 for failure.
Installation is easy. Just download the free Mail Send program from the following link:
It comes as a zipped directory. Unzip the directory and you will find the file (module), Mailsend.pm . Copy this file into the same directory as your Perl program that has the above code.
Mailsend.pm is a text file. Open the file with your text editor. Change the port and the domain name of your mail server from,
my $remote_host = "localhost";
my $port = 587;
to something like,
my $remote_host = "mail.o2online.de";
my $port = 25;
Save the file. Thatís all.
Any problem or suggestion or comments you have about the program should be done at the following group. You may need to subscribe (freely) first.
Related LinksPerl Basics
Perl Data Types
Perl References Optimized
Handling Files and Directories in Perl
Perl Object Oriented Programming
Perl Regular Expressions
Perl Core Number Basics and Testing
Commonly Used Perl Predefined Functions
Line Oriented Operator and Here-doc
Handling Strings in Perl
Using Perl Arrays
Using Perl Hashes
Perl Multi-Dimensional Array
Date and Time in Perl
Namespace in Perl
Perl Eval Function
Writing a Perl Command Line Tool
Perl Insecurities and Prevention
Sending Email with Perl
Miscellaneous Features in Perl
Perl Two-Dimensional Structures
Advanced Perl Regular Expressions
Designing and Using a Perl Module
More Related Links
PurePerl MySQL API
Perl Course - Professional and Advanced
Major in Website Design
Web Development Course
Producing a Pure Perl Library