0

PHP Mail - libMail

Posted by admin on Dec 30, 2008 in PHP

An object oriented way to send email from a PHP program.

Some of the libMail functionalities are :

o Sending one or more file in attachment
o Specify one or many recipients in To, CC or BCC
o Format a message “ready to send” without sending it immediately
o Auto checking of email addresses syntax
o Add a receipt to the mail

Version : 1.3
Licence : GPL
Lastmod : Nov 2001
Author : Leo West

Download libmail.zip


Example:
< ?
include "libmail.php";
$m = new Mail(); // create the mail
$m->From( “leo@isp.com” );
$m->To( “destination@somewhere.fr” );
$m->Subject( “the subject of the mail” );
$m->Body( “Hello\nThis is a test of the Mail component” );
$m->Cc( “someone@somewhere.fr”);
$m->Priority(4);

// attach a file of type image/gif to be displayed in the message if possible

$m->Attach( “/test/test.gif”, “image/gif”, “inline” );

$m->Send(); // send the mail

echo “Mail was sent:”
echo $m->Get(); // show the mail source
? >


For more documentation visit: http://lwest.free.fr/doc/php/lib/index.php3?page=mail&lang=en

Tags: , ,

Copyright © 2010 Sailen’s Blog All rights reserved.