<?php 
 
include "sendmail.class.php";
 
$Mail = new sendmail();
 
 
// Set congif
 
$Mail->SendMailVia = 'smtp';  // Send via smtp server or mail function
 
$Mail->smtp_host = 'mail.myhost.com';
 
$Mail->smtp_port = 25;
 
$Mail->smtp_user = '[email protected]';
 
$Mail->smtp_password = 'mypassw';
 
 
 
// Example 1 (mail from me)
 
if($Mail->Send('[email protected]; recipient2 name <[email protected]>,"recipient name" <[email protected]>','My subject','My message here.'))
 
{
 
  echo 'message Mail send!';
 
}
 
else
 
{
 
  echo $Mail->error;
 
}
 
 
// Example 2 (mail from me)
 
$Mail->mail_to = '[email protected]; recipient2 name <[email protected]>,"recipient name" <[email protected]>';
 
$Mail->subject = 'My subject';
 
$Mail->message = 'My message here';
 
 
if($Mail->Send())
 
{
 
  echo 'message Mail send!';
 
}
 
else
 
{
 
  echo $Mail->error;
 
}
 
 
 
// Example 3 (mail from another user: example [email protected])
 
 
$Mail->mail_to = 'Recipient Name <[email protected]>';
 
$Mail->subject = 'My subject';
 
$Mail->message = 'My message here';
 
$Mail->from_name = 'User2 Name';
 
$Mail->SendFromMail = '[email protected]';
 
 
if($Mail->Send())
 
{
 
  echo 'message Mail send!';
 
}
 
else
 
{
 
  echo $Mail->error;
 
}
 
 
?>
 
 |