Commit ad2b146c authored by Olivier PEREZ's avatar Olivier PEREZ
Browse files

Remove parameter from MailService::send

parent d7d9b11f
......@@ -20,7 +20,7 @@ class MailService {
return filter_var($email, FILTER_VALIDATE_EMAIL);
}
function send($to, $subject, $body, $param = '', $msgKey = null) {
function send($to, $subject, $body, $msgKey = null) {
if ($this->smtp_allowed == true && $this->canSendMsg($msgKey)) {
mb_internal_encoding('UTF-8');
......@@ -54,7 +54,7 @@ class MailService {
// Send mail
$this->sendMail($to, $subject, $body, $param, $msgKey, $headers);
$this->sendMail($to, $subject, $body, $msgKey, $headers);
}
}
......@@ -69,8 +69,8 @@ class MailService {
return !isset($_SESSION[self::MAILSERVICE_KEY][$msgKey]) || time() - $_SESSION[self::MAILSERVICE_KEY][$msgKey] > self::DELAY_BEFORE_RESEND;
}
private function sendMail($to, $subject, $body, $param, $msgKey, $headers) {
mail($to, $subject, $body, $headers, $param);
private function sendMail($to, $subject, $body, $msgKey, $headers) {
mail($to, $subject, $body, $headers, '');
// Log
......
......@@ -43,7 +43,7 @@ if (!empty($_POST['mail'])) {
$smarty->assign('polls', $polls);
$body = $smarty->fetch('mail/find_polls.tpl');
$mailService->send($mail, __('Homepage', 'Where are my polls'), $body, '', 'SEND_POLLS');
$mailService->send($mail, __('Homepage', 'Where are my polls'), $body, 'SEND_POLLS');
$message = new Message('success', __('FindPolls', 'Polls sent'));
} else {
$message = new Message('warning', __('Error', 'No polls found'));
......
......@@ -83,7 +83,7 @@ function sendUpdateNotification($poll, $mailService, $name, $type) {
$message .= Utils::getUrlSondage($poll->admin_id, true) . "\n\n";
$messageTypeKey = $type . '-' . $poll->id;
$mailService->send($poll->admin_mail, $subject, $message, '', $messageTypeKey);
$mailService->send($poll->admin_mail, $subject, $message, $messageTypeKey);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment