Location: PHPKode > projects > KvCMS Content Management System > kvframework/kvframework/mailhandler/kvframework_mailer.class.php
<?php
/**
 * @package KvFramework
 * @subpackage MailHandler
 */

load_file(KVF_FRAMEWORK_DIR."/mailhandler/kvframework_mail_struct.class.php");

/**
 * @package KvFramework
 * @subpackage MailHandler
 */
abstract class kvframework_mailer{
  public static $SEND_MAIL = true;

  public static function new_mail(){
    return new kvframework_mail_struct();
  }

  public static function send(kvframework_mail_struct $mail){
    $headers = "";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: ".$mail->from_name." <".$mail->from.">\r\n";
    $headers .= "Reply-To: ".$mail->from."\r\n";

    if(self::$SEND_MAIL){
      return mail(implode(", ", $mail->recipients), $mail->subject, $mail->content, $headers);
    } else { return true; }
  }
}
?>
Return current item: KvCMS Content Management System