PKPNotificationOperationManager::sendNotificationEmail PHP Method

sendNotificationEmail() private method

Send an email to a user regarding the notification
private sendNotificationEmail ( $request, $notification )
$request PKPRequest
$notification object Notification
    private function sendNotificationEmail($request, $notification)
    {
        $userId = $notification->getUserId();
        $userDao = DAORegistry::getDAO('UserDAO');
        $user = $userDao->getById($userId);
        if ($user) {
            AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON);
            $context = $request->getContext();
            $site = $request->getSite();
            $mail = $this->getMailTemplate('NOTIFICATION');
            $mail->setReplyTo($site->getLocalizedContactEmail(), $site->getLocalizedContactName());
            $mail->assignParams(array('notificationContents' => $this->getNotificationContents($request, $notification), 'url' => $this->getNotificationUrl($request, $notification), 'siteTitle' => $context ? $context->getLocalizedName() : $site->getLocalizedTitle()));
            $mail->addRecipient($user->getEmail(), $user->getFullName());
            $mail->send();
        }
    }