PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Archzilon Eshun-Davies  >  cMail  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example Usage of cMail
Class: cMail
Send HTML e-mail messages with attached files
Author: By
Last change:
Date: 10 years ago
Size: 1,234 bytes
 

Contents

Class file image Download
<?php
/* $Id: example.php,v 1.0 2012/04/12 23:45:00 aedavies Exp $ */
/*
 * Copyright (c) 2011,2012 Archzilon Eshun-Davies
 * <laudarch@qremiaevolution.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */
require_once("cMail.php");

$mail = new cMail;
$file = "path/to/file";
$to = "laudarchzilon@gmail.com";
$from = "Tester Jones<no-reply@gmail.com>";
$subject = "Here's the file you requested";
$message = "Thank you for requesting this File ^^";

$mail->mail($to, $from, $subject, $message, $file);
# Tada :)
?>


For more information send a message to info at phpclasses dot org.