Fix transfer recipient emails not sending in production.
Deploy Ladill Transfer / deploy (push) Successful in 48s
Deploy Ladill Transfer / deploy (push) Successful in 48s
Map MAIL_ENCRYPTION to a valid SMTP scheme, send recipient notifications synchronously, document mail/queue env vars, and add a supervisor worker template. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+12
-1
@@ -1,5 +1,16 @@
|
||||
<?php
|
||||
|
||||
$mailScheme = strtolower(trim((string) env('MAIL_SCHEME', '')));
|
||||
$mailEncryption = strtolower(trim((string) env('MAIL_ENCRYPTION', '')));
|
||||
|
||||
$smtpScheme = match (true) {
|
||||
in_array($mailScheme, ['smtp', 'smtps'], true) => $mailScheme,
|
||||
$mailScheme !== '' => null,
|
||||
in_array($mailEncryption, ['ssl', 'smtps'], true) => 'smtps',
|
||||
in_array($mailEncryption, ['tls', 'starttls', 'smtp'], true) => 'smtp',
|
||||
default => null,
|
||||
};
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
@@ -39,7 +50,7 @@ return [
|
||||
|
||||
'smtp' => [
|
||||
'transport' => 'smtp',
|
||||
'scheme' => env('MAIL_SCHEME'),
|
||||
'scheme' => $smtpScheme,
|
||||
'url' => env('MAIL_URL'),
|
||||
'host' => env('MAIL_HOST', '127.0.0.1'),
|
||||
'port' => env('MAIL_PORT', 2525),
|
||||
|
||||
Reference in New Issue
Block a user