fix: email sending error
This commit is contained in:
parent
50527cf0a3
commit
da6cc151d1
@ -25,10 +25,8 @@ class SendConfirmationForWaitlistJob implements ShouldQueue
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$mail = new MailMessage();
|
$mail = new MailMessage();
|
||||||
|
|
||||||
$confirmation_url = base_url() . '/webhooks/waitlist/confirm?email=' . $this->email . '&confirmation_code=' . $this->uuid;
|
$confirmation_url = base_url() . '/webhooks/waitlist/confirm?email=' . $this->email . '&confirmation_code=' . $this->uuid;
|
||||||
$cancel_url = base_url() . '/webhooks/waitlist/cancel?email=' . $this->email . '&confirmation_code=' . $this->uuid;
|
$cancel_url = base_url() . '/webhooks/waitlist/cancel?email=' . $this->email . '&confirmation_code=' . $this->uuid;
|
||||||
|
|
||||||
$mail->view('emails.waitlist-confirmation',
|
$mail->view('emails.waitlist-confirmation',
|
||||||
[
|
[
|
||||||
'confirmation_url' => $confirmation_url,
|
'confirmation_url' => $confirmation_url,
|
||||||
@ -37,7 +35,7 @@ class SendConfirmationForWaitlistJob implements ShouldQueue
|
|||||||
$mail->subject('You are on the waitlist!');
|
$mail->subject('You are on the waitlist!');
|
||||||
send_user_an_email($mail, $this->email);
|
send_user_an_email($mail, $this->email);
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
send_internal_notification("SendConfirmationForWaitlistJob failed for {$mail} with error: " . $th->getMessage());
|
send_internal_notification("SendConfirmationForWaitlistJob failed for {$this->email} with error: " . $th->getMessage());
|
||||||
ray($th->getMessage());
|
ray($th->getMessage());
|
||||||
throw $th;
|
throw $th;
|
||||||
}
|
}
|
||||||
|
@ -189,12 +189,16 @@ Route::get('/waitlist/confirm', function () {
|
|||||||
send_internal_notification('Waitlist confirmed: ' . $email);
|
send_internal_notification('Waitlist confirmed: ' . $email);
|
||||||
return 'Thank you for confirming your email address. We will notify you when you are next in line.';
|
return 'Thank you for confirming your email address. We will notify you when you are next in line.';
|
||||||
} else {
|
} else {
|
||||||
|
$found->delete();
|
||||||
|
send_internal_notification('Waitlist expired: ' . $email);
|
||||||
return 'Your confirmation code has expired. Please sign up again.';
|
return 'Your confirmation code has expired. Please sign up again.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return redirect()->route('dashboard');
|
return redirect()->route('dashboard');
|
||||||
} catch (error) {
|
} catch (Exception $e) {
|
||||||
|
send_internal_notification('Waitlist confirmation failed: ' . $e->getMessage());
|
||||||
|
ray($e->getMessage());
|
||||||
return redirect()->route('dashboard');
|
return redirect()->route('dashboard');
|
||||||
}
|
}
|
||||||
})->name('webhooks.waitlist.confirm');
|
})->name('webhooks.waitlist.confirm');
|
||||||
@ -209,7 +213,9 @@ Route::get('/waitlist/cancel', function () {
|
|||||||
return 'Your email address has been removed from the waitlist.';
|
return 'Your email address has been removed from the waitlist.';
|
||||||
}
|
}
|
||||||
return redirect()->route('dashboard');
|
return redirect()->route('dashboard');
|
||||||
} catch (error) {
|
} catch (Exception $e) {
|
||||||
|
send_internal_notification('Waitlist cancellation failed: ' . $e->getMessage());
|
||||||
|
ray($e->getMessage());
|
||||||
return redirect()->route('dashboard');
|
return redirect()->route('dashboard');
|
||||||
}
|
}
|
||||||
})->name('webhooks.waitlist.cancel');
|
})->name('webhooks.waitlist.cancel');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user