Skip to content
Snippets Groups Projects
Unverified Commit 8dcea674 authored by Liquidsoul's avatar Liquidsoul
Browse files

Add notificationservice->sendPollCreationMails

parent ad8f8ab2
No related branches found
No related tags found
No related merge requests found
......@@ -85,4 +85,16 @@ class NotificationService {
{
return $type >= self::UPDATE_POLL;
}
function sendPollCreationMails($creator_mail, $creator_name, $poll_name, $poll_id, $admin_poll_id) {
$this->smarty->assign('poll_creator_name', Utils::htmlMailEscape($creator_name));
$this->smarty->assign('poll_name', Utils::htmlMailEscape($poll_name));
$this->smarty->assign('poll_url', Utils::getUrlSondage($poll_id));
$message_participants = $this->smarty->fetch('mail/participants_forward_email.html.tpl');
$this->mailService->send($creator_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Participant link') . '] ' . __('Generic', 'Poll') . ': ' . $poll_name, $message_participants);
$this->smarty->assign('poll_admin_url', Utils::getUrlSondage($admin_poll_id, true));
$message_admin = $this->smarty->fetch('mail/creation_notification_email.html.tpl');
$this->mailService->send($creator_mail, '[' . NOMAPPLICATION . '][' . __('Mail', 'Message for the author') . '] ' . __('Generic', 'Poll') . ': ' . $poll_name, $message_admin);
}
}
{__('Mail', "This is the message to forward to the poll participants.")}
<br/>
<br/>
{$poll_creator_name} {__('Mail', 'has just created a poll called')} {$poll_name}
<br/>
{__('Mail', 'Thank you for participating in the poll at the following link')}:
<br/>
<br/>
<a href="{$poll_url}">{$poll_url}</a>
{__('Mail', "This is the message to forward to the poll participants.")}<br/><br/>{$poll_creator_name} {__('Mail', 'has just created a poll called')} {$poll_name}<br/>{__('Mail', 'Thank you for participating in the poll at the following link')}:<br/><br/><a href="{$poll_url}">{$poll_url}</a>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment