diff --git a/api/app/Mail/Forms/SubmissionConfirmationMail.php b/api/app/Mail/Forms/SubmissionConfirmationMail.php index 9cca8313..de9dd86e 100644 --- a/api/app/Mail/Forms/SubmissionConfirmationMail.php +++ b/api/app/Mail/Forms/SubmissionConfirmationMail.php @@ -54,6 +54,10 @@ class SubmissionConfirmationMail extends OpenFormMail implements ShouldQueue private function getFromEmail() { + if(config('app.self_hosted')) { + return config('mail.from.address'); + } + $originalFromAddress = Str::of(config('mail.from.address'))->explode('@'); return $originalFromAddress->first() . '+' . time() . '@' . $originalFromAddress->last(); diff --git a/api/app/Notifications/Forms/FormSubmissionNotification.php b/api/app/Notifications/Forms/FormSubmissionNotification.php index 0fc2742a..4ff69836 100644 --- a/api/app/Notifications/Forms/FormSubmissionNotification.php +++ b/api/app/Notifications/Forms/FormSubmissionNotification.php @@ -63,6 +63,9 @@ class FormSubmissionNotification extends Notification implements ShouldQueue private function getFromEmail() { + if(config('app.self_hosted')) { + return config('mail.from.address'); + } $originalFromAddress = Str::of(config('mail.from.address'))->explode('@'); return $originalFromAddress->first() . '+' . time() . '@' . $originalFromAddress->last();