| | 182 | |
| | 183 | /** |
| | 184 | * Sends the email notification for recipients. |
| | 185 | */ |
| | 186 | protected function sendNotification() { |
| | 187 | require_once(WCF_DIR.'lib/data/mail/Mail.class.php'); |
| | 188 | |
| | 189 | // send notifications |
| | 190 | foreach ($this->inputArray as $recipient) { |
| | 191 | // send mail |
| | 192 | $subjectData = array( |
| | 193 | '$author' => WCF::getUser()->username, |
| | 194 | 'PAGE_TITLE' => PAGE_TITLE |
| | 195 | ); |
| | 196 | $messageData = array( |
| | 197 | 'PAGE_TITLE' => PAGE_TITLE, |
| | 198 | '$recipient' => $recipient->username, |
| | 199 | '$author' => WCF::getUser()->username, |
| | 200 | '$pageurl' => FileUtil::addTrailingSlash(PAGE_URL), |
| | 201 | '$notice' => (REGISTER_INVITATIONS ? WCF->getLanguage()->get('wcf.buddyloo.invitation.register_invitation') : ""), |
| | 202 | '$body' => $this->body |
| | 203 | ); |
| | 204 | |
| | 205 | $mail = new Mail(array($recipient->email), WCF->getLanguage()->get('wcf.buddyloo.invitation.subject', $subjectData), WCF->getLanguage()->get('wcf.buddyloo.invitation.body', $messageData)); |
| | 206 | $mail->send(); |
| | 207 | } |
| | 208 | } |