PHP Classes

File: sample_text.php

Recommend this page to a friend!
  Classes of Robert Pitt   Email Class (With Attachments)   sample_text.php   Download  
File: sample_text.php
Role: Example script
Content type: text/plain
Description: This is a sample script that's used to send plain-text emails
Class: Email Class (With Attachments)
Send e-mail messages with multiple attachments
Author: By
Last change:
Date: 14 years ago
Size: 465 bytes
 

Contents

Class file image Download
<?php

//Include the emailer class
include 'Emailer.class.php';

//Load the Emailer class into a variable
$Emailer = new Emailer;

//Setup where and where from the message is being sent.
$Emailer->set_to("some_user@gmail.com");
$Emailer->set_from("admin@localhost");
$Emailer->set_sender("me@domain.com");

//Afdd some message percifics
$Emailer->set_subject("This is a plain-text email");
$Emailer->set_text("Hello World!");

$Emailer->send();
?>