Fix verification email bug

master
Skylar Ittner 5 years ago
parent 2c1b68a225
commit 6fef95f630

@ -34,14 +34,14 @@ if (!empty($_POST['email'])) {
try {
$verification = new Email();
$verification->addTo($SETTINGS["smtp"]["notification_to"]);
$verification->addTo(strtolower($_POST['email']));
$verification->setFrom($SETTINGS["smtp"]["fromaddress"], $SETTINGS["smtp"]["fromname"]);
$verification->setSMTP($SETTINGS["smtp"]["host"], $SETTINGS["smtp"]["port"], $SETTINGS["smtp"]["auth"], $SETTINGS["smtp"]["user"], $SETTINGS["smtp"]["password"], $SETTINGS["smtp"]["secure"]);
$verification->setSubject("HACHE email verification");
$verification->setBody("The verification code for renewing your HACHE membership is $code.");
$verification->send();
} catch (Exception $e) {
die("There was a problem sending the verification email. Try again later.");
}
} else if (!empty($_POST['code'])) {
if (empty($_SESSION['code'])) {

Loading…
Cancel
Save