add email in reset password
This commit is contained in:
@@ -136,6 +136,19 @@ function reminder_kuri(){
|
||||
$result = db_insert('resetpwd', $items, 'chitatel');
|
||||
|
||||
$link = SITE.'resetpassword/'.$items['resethash'];
|
||||
$mailconfig = set('noreply');
|
||||
|
||||
$mail['mail'] = $resetmail;
|
||||
$mail['subject'] = 'КЛАН: создание пароля';
|
||||
$mail['message'] = "
|
||||
Вы запросили изменения пароля для Вашей учетной записи.\n
|
||||
Для установления пароля пройдите по ссылке - $link.\n\n
|
||||
- Не передавайте эту ссылку сторонним лицам\n
|
||||
- Если Вы не запрашивали это действие просто проигнорируйте данное письмо\n\n
|
||||
По вопросам обращайтесь на почту shop@argumenti.ru
|
||||
";
|
||||
|
||||
sendmail($mailconfig, $mail);
|
||||
|
||||
$tempcontent = VIEWPATH.'reminder_end.phtml';
|
||||
include VIEWPATH.'layout_lite.phtml'; //центральный шаблон
|
||||
|
||||
@@ -7,25 +7,33 @@ function sendmail($config, $mail){
|
||||
|
||||
$send = new PHPMailer;
|
||||
$send->isSMTP();
|
||||
//$send->SMTPDebug=3; // Set mailer to use SMTP
|
||||
$send->SMTPDebug=3; // Set mailer to use SMTP
|
||||
$send->Host = $config['host']; // Specify main and backup SMTP servers
|
||||
$send->Username = $config['login']; // SMTP username
|
||||
$send->Password = $config['password'];
|
||||
|
||||
if (isset($frommail['secure'])) {
|
||||
$send->SMTPSecure = $frommail['secure'];
|
||||
if (isset($config['secure'])) {
|
||||
$send->SMTPSecure = $config['secure'];
|
||||
$send->SMTPAuth = true;
|
||||
}
|
||||
else {
|
||||
$mail->SMTPSecure = false;
|
||||
$mail->SMTPAutoTLS = false;
|
||||
$send->SMTPSecure = false;
|
||||
$send->SMTPAutoTLS = false;
|
||||
}
|
||||
|
||||
$send->Port = $config['port']; // TCP port to connect to
|
||||
$send->setFrom($config['mail'], $config['name']);
|
||||
$send->addAddress($mail, $mail); // Add a recipient
|
||||
$send->setFrom($config['login'], $config['name']);
|
||||
$send->addAddress($mail['mail'], $mail['mail']); // Add a recipient
|
||||
$send->CharSet = 'UTF-8';
|
||||
$send->isHTML(True); // Set email format to HTML
|
||||
|
||||
if (isset($mail['html'])){
|
||||
$send->isHTML(True); // Set email format to HTML
|
||||
}
|
||||
else {
|
||||
$send->ContentType = 'text/plain';
|
||||
$send->isHTML(False);
|
||||
}
|
||||
|
||||
$send->Subject = $mail['subject'];
|
||||
$send->Body = $mail['message'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user