Remove parameter from MailService::send
This commit is contained in:
parent
d7d9b11fbd
commit
ad2b146c3c
@ -20,7 +20,7 @@ class MailService {
|
|||||||
return filter_var($email, FILTER_VALIDATE_EMAIL);
|
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)) {
|
if ($this->smtp_allowed == true && $this->canSendMsg($msgKey)) {
|
||||||
mb_internal_encoding('UTF-8');
|
mb_internal_encoding('UTF-8');
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ class MailService {
|
|||||||
|
|
||||||
// Send mail
|
// 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;
|
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) {
|
private function sendMail($to, $subject, $body, $msgKey, $headers) {
|
||||||
mail($to, $subject, $body, $headers, $param);
|
mail($to, $subject, $body, $headers, '');
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ if (!empty($_POST['mail'])) {
|
|||||||
$smarty->assign('polls', $polls);
|
$smarty->assign('polls', $polls);
|
||||||
$body = $smarty->fetch('mail/find_polls.tpl');
|
$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'));
|
$message = new Message('success', __('FindPolls', 'Polls sent'));
|
||||||
} else {
|
} else {
|
||||||
$message = new Message('warning', __('Error', 'No polls found'));
|
$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";
|
$message .= Utils::getUrlSondage($poll->admin_id, true) . "\n\n";
|
||||||
|
|
||||||
$messageTypeKey = $type . '-' . $poll->id;
|
$messageTypeKey = $type . '-' . $poll->id;
|
||||||
$mailService->send($poll->admin_mail, $subject, $message, '', $messageTypeKey);
|
$mailService->send($poll->admin_mail, $subject, $message, $messageTypeKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user