<?php
include (dirname(__FILE__)."/libmail.php");
$m= new Mail; // create the mail
$m->From ("leo@isp.com");
// $m->From ("leo@isp.com", "Leo at ISP");
$m->To ("destination@somewhere.fr");
// $m->To (array("someone@somewhere.fr", "somebody@somewhere.fr"));
// $m->To (array("someone@somewhere.fr" => "Someone", "somebody@somewhere.fr" => "Somebody"));
$m->Subject ("the subject of the mail");
$m->Body ("Hello\nThis is a test of the Mail component"); // set the body
$m->Cc ("someone@somewhere.fr");
// $m->Cc (array("someone@somewhere.fr", "somebody@somewhere.fr"));
// $m->Cc (array("someone@somewhere.fr" => "Someone", "somebody@somewhere.fr" => "Somebody"));
$m->Bcc ("someoneelse@somewhere.fr");
// $m->Bcc (array("someone@somewhere.fr", "somebody@somewhere.fr"));
// $m->Bcc (array("someone@somewhere.fr" => "Someone", "somebody@somewhere.fr" => "Somebody"));
$m->Priority (4) ; // set the priority to Low
$m->Attach ("/home/leo/toto.gif", "image/gif", "inline") ; // attach a file of type image/gif to be displayed in the message if possible
$m->Attach ("/home/leo/toto.gif", "image/gif", "attachment", "fun.gif"); // attach toto.gif file as fun.gif
$m->Send (); // send the mail
echo "Mail was sent:<br><pre>", $m->Get (), "</pre>";
?>
|