From: Florent Bruneau Date: Tue, 30 Dec 2008 17:10:31 +0000 (+0100) Subject: Add PlMailer::sendTo($user). X-Git-Tag: core/1.0.1~39 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=964cfce78ea120a78a671ba0843ef8f842cc0f94;p=platal.git Add PlMailer::sendTo($user). Signed-off-by: Florent Bruneau --- diff --git a/classes/plmailer.php b/classes/plmailer.php index 08e71f8..6ef787d 100644 --- a/classes/plmailer.php +++ b/classes/plmailer.php @@ -307,6 +307,13 @@ class PlMailer extends Mail_Mime { } } + public function sendTo(PlUser &$user) + { + $this->addTo('"' . $user->fullName() . '" <' . $user->bestEmail() . '>'); + $this->assign_by_ref('user', $user); + return $this->send($user->isEmailFormatHtml()); + } + public function send($with_html = true) { $this->processPage($with_html);