<?php
/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
+ * Copyright (C) 2003-2007 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
require_once('smarty/libs/Smarty.class.php');
-// {{{ class PlMail
-
/** Classe de mail avec corps en templates.
*/
class PlMail extends Smarty
$this->compile_check = true;
$this->template_dir = $globals->spoolroot . "/templates/";
- $this->compile_dir = $globals->spoolroot . "/spool/templates_c/";
+ $this->compile_dir = $globals->spoolroot . "/spool/templates_c/mails/";
$this->config_dir = $globals->spoolroot . "/configs/";
+
$this->register_outputfilter(Array($this, 'mail_format'));
$this->register_function('from', Array($this, 'setFrom'));
private function processPage($with_html = true)
{
+ $level = error_reporting(0);
if (!is_null($this->page)) {
$this->setTxtBody($this->page->run(false));
if ($with_html) {
}
}
}
+ error_reporting($level);
}
public function send($with_html = true)
{
$this->processPage($with_html);
if (S::v('forlife')) {
- $this->addHeader('X-Org-Mail', S::v('forlife') . '@polytechnique.org');
+ global $globals;
+ $this->addHeader('X-Org-Mail', S::v('forlife') . '@' . $globals->mail->domain);
}
$addrs = Array();
foreach(Array('To', 'Cc', 'Bcc') as $hdr) {