From 5ffe535b0ca3f39edc5c38662aee91d55ddba414 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 11 Nov 2006 21:07:07 +0000 Subject: [PATCH] r1284: Update the mail sending code to work with ISSO 2.1.x --- includes/class_notification.php | 6 ++---- register.php | 21 +++++++++------------ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/includes/class_notification.php b/includes/class_notification.php index d639b3e..f1e13df 100644 --- a/includes/class_notification.php +++ b/includes/class_notification.php @@ -659,9 +659,7 @@ Initial report: continue; } - $this->registry->mail->to = array(); - $this->registry->mail->to_add($this->users["$userid"]['displayname'], $this->users["$userid"]['email']); - $this->registry->mail->set('bodytext', sprintf(_('Hi %1$s, + $this->registry->mail->setBodyText(sprintf(_('Hi %1$s, You are receiving this email because you have opted to get notifications for the %2$s bug tracker. @@ -683,7 +681,7 @@ If you no longer want to receive email from us, please log into your account and $this->bug['summary'], $this->bug['bugid'] )); - $this->registry->mail->send(true); + $this->registry->mail->send($this->users["$userid"]['email'], $this->users["$userid"]['displayname']); } } } diff --git a/register.php b/register.php index b4b0307..7441765 100755 --- a/register.php +++ b/register.php @@ -95,9 +95,8 @@ if ($_POST['do'] == 'insert') $db->query("INSERT INTO " . TABLE_PREFIX . "useractivation (userid, activator, dateline, usergroupid) VALUES ($userid, '$activationid', " . TIMENOW . ", 2)"); - $mail->to_add($bugsys->in['displayname'], $bugsys->in['email']); - $mail->set('subject', sprintf(_('Welcome to %1$s'), $bugsys->options['trackertitle'])); - $mail->set('bodytext', sprintf(_('Hi %1$s, + $mail->setSubject(sprintf(_('Welcome to %1$s'), $bugsys->options['trackertitle'])); + $mail->setBodyText(sprintf(_('Hi %1$s, Welcome to the %2$s tracker. Before you can begin posting bug reports, you\'ll need to activae your account. To do this, please click this link: @@ -110,7 +109,7 @@ Welcome to the %2$s tracker. Before you can begin posting bug reports, you\'ll n $activationid )); - $mail->send(); + $mail->send($bugsys->in['email'], $bugsys->in['displayname']); $message->message(_('You now need to activate your account via email.')); } @@ -118,9 +117,8 @@ Welcome to the %2$s tracker. Before you can begin posting bug reports, you\'ll n { if ($bugsys->options['sendwelcomemail']) { - $mail->to_add($bugsys->in['displayname'], $bugsys->in['email']); - $mail->set('subject', sprintf(_('Welcome to %1$s'), $bugsys->options['trackertitle'])); - $mail->set('bodytext', sprintf(_('Hi %1$s, + $mail->setSubject(sprintf(_('Welcome to %1$s'), $bugsys->options['trackertitle'])); + $mail->setBodyText(sprintf(_('Hi %1$s, Thank you for taking the time to register at %2$s. We look forward to your contributations to making our products better. @@ -129,7 +127,7 @@ If you have any questions, please don\'t hesitate to contact the webmaster.'), $bugsys->options['trackertitle'] )); - $mail->send(); + $mail->send($bugsys->in['email'], $bugsys->in['displayname']); } if ($usergroupid == 4) @@ -187,9 +185,8 @@ if ($_REQUEST['do'] == 'activate') if ($bugsys->options['sendwelcomemail']) { - $mail->to_add($user['displayname'], $user['email']); - $mail->set('subject', sprintf(_('Welcome to %1$s'), $bugsys->options['trackertitle'])); - $mail->set('bodytext', sprintf(_('Hi %1$s, + $mail->setSubject(sprintf(_('Welcome to %1$s'), $bugsys->options['trackertitle'])); + $mail->setBodyText(sprintf(_('Hi %1$s, Thank you for taking the time to register at %2$s. We look forward to your contributations to making our products better. @@ -197,7 +194,7 @@ If you have any questions, please don\'t hesitate to contact the webmaster.'), $user['displayname'], $bugsys->options['trackertitle'] )); - $mail->send(); + $mail->send($user['email'], $user['displayname']); } $message->message(_('Your account is now activated and you can now login.')); -- 2.43.5