diff --git a/api/app/Mail/Forms/SubmissionConfirmationMail.php b/api/app/Mail/Forms/SubmissionConfirmationMail.php index 9cca8313f..de9dd86e7 100644 --- a/api/app/Mail/Forms/SubmissionConfirmationMail.php +++ b/api/app/Mail/Forms/SubmissionConfirmationMail.php @@ -54,6 +54,10 @@ public function build() 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 0fc2742a3..4ff69836f 100644 --- a/api/app/Notifications/Forms/FormSubmissionNotification.php +++ b/api/app/Notifications/Forms/FormSubmissionNotification.php @@ -63,6 +63,9 @@ public function toMail($notifiable) 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();