Show contact confirmation before sending email
This commit is contained in:
@@ -6,6 +6,8 @@ use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Livewire\Component;
|
||||
use Throwable;
|
||||
|
||||
use function Illuminate\Support\defer;
|
||||
class ContactForm extends Component {
|
||||
public string $name = '';
|
||||
public string $email = '';
|
||||
@@ -23,7 +25,7 @@ class ContactForm extends Component {
|
||||
$this->reset(['name','email','company','service','message']);
|
||||
$this->submitted = true;
|
||||
|
||||
$this->notifyByEmail($enquiry);
|
||||
defer(fn () => $this->notifyByEmail($enquiry))->always();
|
||||
}
|
||||
|
||||
/** Send a notification and record failures without including enquiry contents. */
|
||||
|
||||
Reference in New Issue
Block a user