add email in reset password
This commit is contained in:
@@ -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