More cleanup and improvements in email verification.

This commit is contained in:
Retro_Guy 2022-11-02 03:46:56 +00:00
parent 229cac0de1
commit c574dd4c66
2 changed files with 14 additions and 1 deletions

View File

@ -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";

View File

@ -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";