Skip to content

Commit 7f6c214

Browse files
authored
fix email from address in self hosted mode (#573)
* fix email from address in self hosted mode * fix linting
1 parent 2c70ed0 commit 7f6c214

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

api/app/Mail/Forms/SubmissionConfirmationMail.php

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ public function build()
5454

5555
private function getFromEmail()
5656
{
57+
if(config('app.self_hosted')) {
58+
return config('mail.from.address');
59+
}
60+
5761
$originalFromAddress = Str::of(config('mail.from.address'))->explode('@');
5862

5963
return $originalFromAddress->first() . '+' . time() . '@' . $originalFromAddress->last();

api/app/Notifications/Forms/FormSubmissionNotification.php

+3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public function toMail($notifiable)
6363

6464
private function getFromEmail()
6565
{
66+
if(config('app.self_hosted')) {
67+
return config('mail.from.address');
68+
}
6669
$originalFromAddress = Str::of(config('mail.from.address'))->explode('@');
6770

6871
return $originalFromAddress->first() . '+' . time() . '@' . $originalFromAddress->last();

0 commit comments

Comments
 (0)