Moderators: jmacgreg, michael, jheckman, barbarah, btbell, bdgregg, asmecher
import('mail.MailTemplate');
$mail = &new MailTemplate('USER_REGISTER');
$mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
$mail->assignParams(array('username' => $this->getData('username'), 'password' => $password, 'userFullName' => $user->getFullName()));
$mail->addRecipient($user->getEmail(), $user->getFullName());
$mail->send();
function sendNotice($article,$commentId,$parentId,$parent) {
import('mail.MailTemplate');
$mail = &new MailTemplate('COMMENT_NOTICE');
$authors = &$article->getAuthors();
$author = &$authors[0];
$mail->addRecipient($author->getEmail(), $author->getFullName());
$journal = &Request::getJournal();
if($journal->getSetting('copySubmissionAckSpecified'))
if (!empty($copyAddress)) $mail->addBcc($journal->getSetting('copySubmissionAckAddress'));
$commentText = "";
if ($parentId > 0)
$commentText="This is a reply to '{$parent->getTitle()}'.";
$mail->assignParams(array(
'articleTitle' => strip_tags($article->getArticleTitle()),
'authorName' => $author->getFullName(),
'articleUrl' => Request::url(null, 'article', 'view', $article->getBestArticleId()),
'commentTitle' => $this->getData('commentTitle'),
'commentBody' => $this->getData('commentBody'),
'posterName' => $this->getData('posterName'),
'posterEmail' => $this->getData('posterEmail'),
'commentId' => $commentId,
'parentId' => $parentId,
'commentText' => $commentText
));
$mail->send();
}
}Users browsing this forum: No registered users and 1 guest