adding proper headers for HTML mail
This commit is contained in:
parent
787942b6f9
commit
93d0ec06a6
@ -368,7 +368,13 @@ class User {
|
|||||||
$smarty->assign('TOKEN', $token);
|
$smarty->assign('TOKEN', $token);
|
||||||
$smarty->assign('USERNAME', $username);
|
$smarty->assign('USERNAME', $username);
|
||||||
$smarty->assign('WEBSITENAME', $this->config['website']['name']);
|
$smarty->assign('WEBSITENAME', $this->config['website']['name']);
|
||||||
if (mail($email, $smarty->fetch('templates/mail/subject.tpl'), $smarty->fetch('templates/mail/body.tpl'))) {
|
$headers = 'From: Website Administration <' . $this->config['website']['email'] . ">\n";
|
||||||
|
$headers .= "MIME-Version: 1.0\n";
|
||||||
|
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
|
||||||
|
if (mail($email,
|
||||||
|
$smarty->fetch('templates/mail/subject.tpl'),
|
||||||
|
$smarty->fetch('templates/mail/body.tpl'),
|
||||||
|
$headers)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
$this->setErrorMessage("Unable to send mail to your address");
|
$this->setErrorMessage("Unable to send mail to your address");
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
Hello {$USERNAME},
|
<html>
|
||||||
|
<body>
|
||||||
You have requested a password reset through our online form.
|
<p>Hello {$USERNAME},</p><br />
|
||||||
In order to complete the request please follow this link
|
<p>You have requested a password reset through our online form. In order to complete the request please follow this link:</p>
|
||||||
|
<p>http://{$smarty.server.SERVER_NAME}{$smarty.server.PHP_SELF}?page=password&action=change&token={$TOKEN}</p>
|
||||||
http://{$smarty.server.SERVER_NAME}{$smarty.server.PHP_SELF}?page=password&action=change&token={$TOKEN}
|
<p>You will be asked to change your password. You can then use this new password to login to your account.</p>
|
||||||
|
<p>Cheers,</p>
|
||||||
You will be asked to change your password. You can then use this new
|
<p>Website Administration</p>
|
||||||
password to login to your account.
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
Cheers,
|
|
||||||
Website Administration
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user