From 964cfce78ea120a78a671ba0843ef8f842cc0f94 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 30 Dec 2008 18:10:31 +0100 Subject: [PATCH] Add PlMailer::sendTo($user). Signed-off-by: Florent Bruneau --- classes/plmailer.php | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- 2.1.4