Use noreply@ladill.com for Events mail like other Ladill apps.
Deploy Ladill Events / deploy (push) Successful in 49s
Deploy Ladill Events / deploy (push) Successful in 49s
Stop overriding the From display name with the event title; rely on MAIL_FROM_ADDRESS and MAIL_FROM_NAME only. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-2
@@ -56,8 +56,8 @@ MAIL_HOST=127.0.0.1
|
|||||||
MAIL_PORT=587
|
MAIL_PORT=587
|
||||||
MAIL_USERNAME=
|
MAIL_USERNAME=
|
||||||
MAIL_PASSWORD=
|
MAIL_PASSWORD=
|
||||||
MAIL_FROM_ADDRESS=events@ladill.com
|
MAIL_FROM_ADDRESS=noreply@ladill.com
|
||||||
MAIL_FROM_NAME="Ladill Events"
|
MAIL_FROM_NAME=Ladill
|
||||||
|
|
||||||
# Legacy Bird SMTP API (unused for attendee/speaker mail; kept for future Bird integration)
|
# Legacy Bird SMTP API (unused for attendee/speaker mail; kept for future Bird integration)
|
||||||
SMTP_PLATFORM_API_URL=https://ladill.com/api/smtp
|
SMTP_PLATFORM_API_URL=https://ladill.com/api/smtp
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ class EventEmailService
|
|||||||
'Programme for '.$eventName,
|
'Programme for '.$eventName,
|
||||||
'mail.notifications.event-programme',
|
'mail.notifications.event-programme',
|
||||||
compact('eventName', 'programmeUrl', 'attendeeName'),
|
compact('eventName', 'programmeUrl', 'attendeeName'),
|
||||||
$eventName,
|
|
||||||
$organizerEmail,
|
$organizerEmail,
|
||||||
$organizerName,
|
$organizerName,
|
||||||
);
|
);
|
||||||
@@ -49,7 +48,6 @@ class EventEmailService
|
|||||||
'Join '.$eventName,
|
'Join '.$eventName,
|
||||||
'mail.notifications.event-join',
|
'mail.notifications.event-join',
|
||||||
compact('eventName', 'joinUrl', 'attendeeName'),
|
compact('eventName', 'joinUrl', 'attendeeName'),
|
||||||
$eventName,
|
|
||||||
$organizerEmail,
|
$organizerEmail,
|
||||||
$organizerName,
|
$organizerName,
|
||||||
);
|
);
|
||||||
@@ -71,7 +69,6 @@ class EventEmailService
|
|||||||
$eventName.' — programme & join link',
|
$eventName.' — programme & join link',
|
||||||
'mail.notifications.event-join-programme',
|
'mail.notifications.event-join-programme',
|
||||||
compact('eventName', 'joinUrl', 'programmeUrl', 'attendeeName'),
|
compact('eventName', 'joinUrl', 'programmeUrl', 'attendeeName'),
|
||||||
$eventName,
|
|
||||||
$organizerEmail,
|
$organizerEmail,
|
||||||
$organizerName,
|
$organizerName,
|
||||||
);
|
);
|
||||||
@@ -93,7 +90,6 @@ class EventEmailService
|
|||||||
'Registration confirmed — '.$eventName,
|
'Registration confirmed — '.$eventName,
|
||||||
'mail.notifications.event-registration-confirmed',
|
'mail.notifications.event-registration-confirmed',
|
||||||
compact('eventName', 'badgeCode', 'joinUrl', 'attendeeName'),
|
compact('eventName', 'badgeCode', 'joinUrl', 'attendeeName'),
|
||||||
$eventName,
|
|
||||||
$organizerEmail,
|
$organizerEmail,
|
||||||
$organizerName,
|
$organizerName,
|
||||||
);
|
);
|
||||||
@@ -118,7 +114,6 @@ class EventEmailService
|
|||||||
'portalUrl' => $portalUrl,
|
'portalUrl' => $portalUrl,
|
||||||
'speakerName' => $speakerName,
|
'speakerName' => $speakerName,
|
||||||
],
|
],
|
||||||
$eventName,
|
|
||||||
$organizerEmail,
|
$organizerEmail,
|
||||||
$organizerName,
|
$organizerName,
|
||||||
);
|
);
|
||||||
@@ -131,7 +126,6 @@ class EventEmailService
|
|||||||
string $subject,
|
string $subject,
|
||||||
string $view,
|
string $view,
|
||||||
array $viewData,
|
array $viewData,
|
||||||
?string $fromDisplayName = null,
|
|
||||||
?string $replyToEmail = null,
|
?string $replyToEmail = null,
|
||||||
?string $replyToName = null,
|
?string $replyToName = null,
|
||||||
): bool {
|
): bool {
|
||||||
@@ -144,7 +138,6 @@ class EventEmailService
|
|||||||
$subject,
|
$subject,
|
||||||
$html,
|
$html,
|
||||||
$text,
|
$text,
|
||||||
$fromDisplayName,
|
|
||||||
$replyToEmail,
|
$replyToEmail,
|
||||||
$replyToName,
|
$replyToName,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ use Illuminate\Support\Facades\Mail;
|
|||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends Ladill Events transactional email from the platform mailer (like Invoice),
|
* Sends Ladill Events transactional email via the platform mailer
|
||||||
* not the event owner's Bird SMTP domain. Reply-To is set to the organiser.
|
* (noreply@ladill.com — same as CRM and other Ladill apps).
|
||||||
*/
|
*/
|
||||||
class EventMailer
|
class EventMailer
|
||||||
{
|
{
|
||||||
@@ -35,7 +35,6 @@ class EventMailer
|
|||||||
string $subject,
|
string $subject,
|
||||||
string $html,
|
string $html,
|
||||||
?string $text = null,
|
?string $text = null,
|
||||||
?string $fromDisplayName = null,
|
|
||||||
?string $replyToEmail = null,
|
?string $replyToEmail = null,
|
||||||
?string $replyToName = null,
|
?string $replyToName = null,
|
||||||
): bool {
|
): bool {
|
||||||
@@ -56,12 +55,12 @@ class EventMailer
|
|||||||
$reference = 'events_email:'.Str::uuid();
|
$reference = 'events_email:'.Str::uuid();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Mail::html($html, function ($message) use ($to, $subject, $text, $fromDisplayName, $replyToEmail, $replyToName): void {
|
Mail::html($html, function ($message) use ($to, $subject, $text, $replyToEmail, $replyToName): void {
|
||||||
$message->to($to)
|
$message->to($to)
|
||||||
->subject($subject)
|
->subject($subject)
|
||||||
->from(
|
->from(
|
||||||
(string) config('mail.from.address'),
|
(string) config('mail.from.address'),
|
||||||
$fromDisplayName ?: (string) config('mail.from.name'),
|
(string) config('mail.from.name'),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($replyToEmail) {
|
if ($replyToEmail) {
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ class EventSpeakerInviteTest extends TestCase
|
|||||||
$this->withoutMiddleware(\App\Http\Middleware\EnsurePlatformSession::class);
|
$this->withoutMiddleware(\App\Http\Middleware\EnsurePlatformSession::class);
|
||||||
|
|
||||||
config([
|
config([
|
||||||
'mail.from.address' => 'events@ladill.com',
|
'mail.from.address' => 'noreply@ladill.com',
|
||||||
'mail.from.name' => 'Ladill Events',
|
'mail.from.name' => 'Ladill',
|
||||||
'events.service_api_keys.meet' => 'test-meet-key',
|
'events.service_api_keys.meet' => 'test-meet-key',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user