PHP Classes
elePHPant
Icontem

File: arioch_class_sample.inc

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Massimo Squillace  >  Arioch Mail  >  arioch_class_sample.inc  >  Download  
File: arioch_class_sample.inc
Role: Example script
Content type: text/plain
Description: A sample drop-in replacement for mail()
Class: Arioch Mail
Send e-mail messages via SMTP
Author: By
Last change:
Date: 6 years ago
Size: 816 bytes
 

Contents

Class file image Download
<?php
/**
 * Sample replacements for both PHP mail() and ezmlm_hash() functions
 * built using the Arioch_mail class.
 * Put/include this code in auto_prepend.php or at beginning of script.
 */
require_once("arioch_class.inc");

$Arioch['host'] = 'smtp.host.com'; /* Change as needed */
$Arioch['port'] = 25; /* Change as needed */
$Arioch['dbg'] = true; /* Change as needed */
$Arioch['dbg_pfx'] = '/tmp/arioch.debug'; /* Change as needed */

function mail($to, $subject, $message, $headers = null, $params = null)
  {
  global
$Arioch;

 
$smtp = new Arioch_mail($Arioch);
 
$smtp->setup($to, $subject, $headers, $params);
  return
$smtp->send($message);
  }

function
ezmlm_hash($addr)
  {
 
$ez = new Arioch_ezmlm();
  return
$ez->hash($addr);
  }
?>