PHP Classes

File: email.test.php

Recommend this page to a friend!
  Classes of Michal Vrchota   CMail Composite   email.test.php   Download  
File: email.test.php
Role: Example script
Content type: text/plain
Description: Example file
Class: CMail Composite
Compose and send e-mail messages with attachments
Author: By
Last change: nothing important
Date: 18 years ago
Size: 590 bytes
 

Contents

Class file image Download
<?php

// I know that there are many email classes, but my is gooood :)))

require_once("mail.php");

try
{
   
$Mail = new CMail;
   
   
$Mail->from = "tester@hotmail.com";
   
$Mail->fromName = "Foo Bar";
   
$Mail->to = Array("email1@hotmail.com", "email2@hotmail.com");
   
$Mail->subject = "Subject";
   
$Mail->message = "<HTML><BODY>This is test email</BODY></HTML>";
   
$Mail->charset = "iso-8859-2";
   
$Mail->mime = "text/html";
   
   
$Mail->AddAttachment("mail.php", "mail.class.txt");
   
$Mail->Send();
}
catch(
EmailException $e)
{
    echo
$e->getMessage();
}

?>