Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_attachements.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Robert Pitt  >  Email Class (With Attachments)  >  sample_attachements.php  >  Download  
File: sample_attachements.php
Role: Example script
Content type: text/plain
Description: This is a sample script that's used to send HTML Formatted + attachments to an email account
Class: Email Class (With Attachments)
Send e-mail messages with multiple attachments
Author: By
Last change:
Date: 4 years ago
Size: 639 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 html formatted email with files");
$Emailer->set_html("Here's your files");

//Add some files
$Emailer->add_attachments(
    array(
      
"path/to/yout/file.ext",
      
"path/to/yout/file2.ext"
      
/*Add more here if need be*/
    
)
);
$Emailer->send();
?>