Location: PHPKode > projects > WB News > includes/lib/Mailer.php
<?php

/*========================================================*\
||########################################################||
||#                                                      #||
||#     WB News v2.0.0                                   #||
||# ---------------------------------------------------- #||
||#     Copyright (c) 2004-2007                          #||
||#     Created: 9th Feb 2007                            #||
||#     Filename: Mailer.php                             #||
||#                                                      #||
||########################################################||
/*========================================================*/

/**
 *  @author $Author: pmcilwaine $
 *	@version $Id: Mailer.php,v 1.1.2.1 2008/02/03 09:45:22 pmcilwaine Exp $
 */

class Mailer
{

	function Mailer()
	{
	}

	function alert_webmaster( $msg )
	{
		$headers = array();
		$headers[] = "Content-Type: plain/text";
		$headers[] = "From: <hide@address.com>";

		$subject = "WB News system warning";
		
		$this->SendMail( $subject, $msg, WEBMASTER_EMAIL, WEBMASTER_NAME, $headers );
	}

	function SendMail( $subject, $message, $toemail, $toname, $headers=array() )
	{
		$to = "$toname <$toemail>";
		$headers = join( "\r\n", $headers );
		$mail = mail( $to, $subject, $message, $headers );
	}

}
Return current item: WB News