CleanCode Perl Libraries |
Home | Perl | Java | PowerShell | C# | SQL | Index | Tools | Download | What's New |
Multi-Lingual Library | Maintainability | ||||||||||||
Perl | Java | JavaScript | Certified Class |
Testable Class |
Standalone Mode |
Diagnostic Enabled |
Net::SimpleMail - Provides basic e-mail function.
use Net::SimpleMail;
my $sendmail = getMailer();
$success = sendMessage($sendmail, $subject, $body, $from, $recipient, $bcc);
Perl5.005
Default: getMailer, sendMessage
Optional: none
This is a simple e-mailing support module.
getMailer()
Searches for one of several standard Unix/Linux mail programs that may be used to send an e-mail and returns the program name with an absolute path, suitable for passing to sendMessage.
This subroutine is adapted from the test_server.pl program from Webside Fx (http://www.4webmasters.us).
available mail program or undef if none found
sendMessage(mailprog, subject, body, sender, recipient, bcc)
Send email from $sender to $recipient with the specified $subject and $body.
mailprog
- string; executable mail program (acquired from getMailer)
subject
- string; contents of subject field
body
- string; body of email
sender
- string; sender email address
recipient
- string; recipient email address
bcc
- string; blind carbon copy email address
1 if successful in communicating to the mail program; 0 otherwise. Note that this in way indicates success or failure of the e-mail transmission to the recipient(s)!
None
Michael Sorens
$Revision: 8 $ $Date: 2006-12-19 21:13:43 -0800 (Tue, 19 Dec 2006) $
CleanCode 0.9.05
Hey! The above document had some coding errors, which are explained below:
=back doesn't take any parameters, but you said =back -- end of FUNCTION section
Home | Perl | Java | PowerShell | C# | SQL | Index | Tools | Download | What's New |
CleanCode Perl Libraries | Copyright © 2001-2013 Michael Sorens - Revised 2013.06.30 |