fix: help

This commit is contained in:
Andras Bacsai 2023-09-14 18:41:21 +02:00
parent 4b313bb1c6
commit 81f7a65dd5
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@ public function mount()
public function submit()
{
try {
$this->rateLimit(1, 60);
// $this->rateLimit(1, 1);
$this->validate();
$subscriptionType = auth()->user()?->subscription?->type() ?? 'Free';
$debug = "Route: {$this->path}";
@ -41,7 +41,7 @@ public function submit()
]
);
$mail->subject("[HELP - {$subscriptionType}]: {$this->subject}");
send_user_an_email($mail, auth()->user()?->email, 'hi@coollabs.io');
send_user_an_email($mail, auth()->user()?->email, 'hi@coollabs.io');
$this->emit('success', 'Your message has been sent successfully. We will get in touch with you as soon as possible.');
} catch (\Throwable $e) {
return general_error_handler($e, $this);

View File

@ -276,6 +276,7 @@ function send_user_an_email(MailMessage $mail, string $email, ?string $cc = null
[],
fn (Message $message) => $message
->to($email)
->replyTo($email)
->cc($cc)
->subject($mail->subject)
->html((string) $mail->render())