PHP Classes

File: usage.php

Recommend this page to a friend!
  Classes of daniel   eMail   usage.php   Download  
File: usage.php
Role: Example script
Content type: text/plain
Description: usage
Class: eMail
Sending text or HTML e-mail to multiple addresses
Author: By
Last change:
Date: 20 years ago
Size: 781 bytes
 

Contents

Class file image Download
<?
$html
= true;

// Class einbinden
include("class_mail.php");

// Absender angeben
$mail = new eMail("Absender_Name","[email protected]");

// Betreff angeben
$mail->subject("test");

// Entfänger angeben
$mail->to("[email protected]");
$mail->to("[email protected]");

// CC-Entfänger angeben
$mail->cc("[email protected]");
$mail->cc("[email protected]");

// BCC-Entfänger angeben
$mail->bcc("[email protected]");
$mail->bcc("[email protected]");

if(
true==$html)
{
   
// HTML angeben
   
$mail->html("My first <b>HTML-Mail</b>");
}
else
{
   
// Text angeben
   
$mail->text("My first Text-Mail");
}

// Anhang hinzufügen
$mail->attachment("text.zip");

// eMail versenden
$mail->send();
?>