Skip to content

Commit 91fe326

Browse files
committed
added logs
1 parent b8d5cf7 commit 91fe326

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/private/utils.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ public function sendEmailTo(int $ownerId, string $triggerName, string $stringUrl
154154
//Server settings
155155
$mail->isSMTP();
156156
$mail->SMTPDebug = 0; # Set 0 for non-debug, 2 for full debug.
157+
$mail->Debugoutput = 'error_log';
157158
$mail->SMTPAuth = true;
158159
$mail->CharSet = 'UTF-8';
159160
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // tls implicit
@@ -162,6 +163,8 @@ public function sendEmailTo(int $ownerId, string $triggerName, string $stringUrl
162163
$mail->Password = $_ENV['MAIL_PWD'];
163164
$mail->Host = $_ENV['MAIL_HOST'];
164165
$mail->Mailer = "smtp"; //Send using SMTP
166+
$mail->Timeout = 5;
167+
$mail->SMTPKeepAlive = false;
165168

166169
// retrieve the data of the trigger's owner
167170
$ownerData = $this->getOwnerData($ownerId);
@@ -618,6 +621,7 @@ public function sendEmailVerification(string $email, string $name)
618621
//Server settings
619622
$mail->isSMTP();
620623
$mail->SMTPDebug = 0; # Set 0 for non-debug, 2 for full debug.
624+
$mail->Debugoutput = 'error_log';
621625
$mail->SMTPAuth = true;
622626
$mail->CharSet = 'UTF-8';
623627
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // tls implicit
@@ -626,6 +630,8 @@ public function sendEmailVerification(string $email, string $name)
626630
$mail->Password = $_ENV['MAIL_PWD'];
627631
$mail->Host = $_ENV['MAIL_HOST'];
628632
$mail->Mailer = "smtp"; //Send using SMTP
633+
$mail->Timeout = 5;
634+
$mail->SMTPKeepAlive = false;
629635

630636
// Add recipient
631637
$mail->addAddress($email);

src/public/newauth.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@
3131

3232
if(!$result['success']){
3333
header("location:register.php?e=2");
34+
exit;
3435
}
3536
header("location:login.php?s=1");
37+
exit;
3638
} else {
3739
// return errror
3840
header('location:register.php?e=3');
41+
exit;
3942
}
4043

4144
?>

0 commit comments

Comments
 (0)