More cleanup and improvements in email verification.
This commit is contained in:
parent
229cac0de1
commit
c574dd4c66
|
@ -300,11 +300,15 @@ $mail->Username = $mailer['username'];
|
|||
$mail->Password = $mailer['password'];;
|
||||
$mail->SMTPSecure = 'tls';
|
||||
|
||||
$mail->setFrom($mailer['username'].'@'.$mailer['host'], $mailer['username']);
|
||||
$mail->setFrom($mail_user.'@'.$mail_domain, $mail_name);
|
||||
$mail->addAddress($user_email);
|
||||
|
||||
$mail->Subject = "Confirmation code for ".$_SERVER['HTTP_HOST'];
|
||||
|
||||
foreach($mail_custom_header as $key => $value) {
|
||||
$mail->addCustomHeader($key, $value);
|
||||
}
|
||||
|
||||
$mycode = create_code($username);
|
||||
$msg="A request to create an account on ".$_SERVER['HTTP_HOST'];
|
||||
$msg.=" has been made using ".$user_email.".\n\n";
|
||||
|
|
|
@ -6,6 +6,15 @@
|
|||
$phpmailer['smtp'] = '/usr/share/php/libphp-phpmailer/src/SMTP.php';
|
||||
$phpmailer['exception'] = '/usr/share/php/libphp-phpmailer/src/Exception.php';
|
||||
|
||||
# Custom Headers (you can add multiple)
|
||||
#$mail_custom_header['X-Custom-Header-Name'] = "header info";
|
||||
|
||||
# Display From info
|
||||
$mail_user = "user";
|
||||
$mail_domain = "domain";
|
||||
$mail_name = "Name for user";
|
||||
|
||||
# Log in info
|
||||
$mailer = array();
|
||||
$mailer['host'] = "mail.example.com";
|
||||
$mailer['port'] = "587";
|
||||
|
|
Loading…
Reference in New Issue