Custom SMTP Settings (#561)
* Custom SMTP Settings * Fix lint * Custom SMTP add in Pricing plan * Allow reset email settings * improve custom SMTP using seprate abstract class * test case for custom SMTP * fix test case * UI improvement * add CASHIER_KEY in phpunit for testcase * Attempt to fix tests * Run pint and attempt to fix cache tests * Fix user management tests * Fix code linters * Merged main & fix linting --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -15,15 +15,17 @@ class FormSubmissionNotification extends Notification implements ShouldQueue
|
||||
use Queueable;
|
||||
|
||||
public FormSubmitted $event;
|
||||
private $mailer;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(FormSubmitted $event, private $integrationData)
|
||||
public function __construct(FormSubmitted $event, private $integrationData, string $mailer)
|
||||
{
|
||||
$this->event = $event;
|
||||
$this->mailer = $mailer;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,6 +54,7 @@ class FormSubmissionNotification extends Notification implements ShouldQueue
|
||||
->useSignedUrlForFiles();
|
||||
|
||||
return (new MailMessage())
|
||||
->mailer($this->mailer)
|
||||
->replyTo($this->getReplyToEmail($notifiable->routes['mail']))
|
||||
->from($this->getFromEmail(), config('app.name'))
|
||||
->subject('New form submission for "' . $this->event->form->title . '"')
|
||||
@@ -63,7 +66,7 @@ class FormSubmissionNotification extends Notification implements ShouldQueue
|
||||
|
||||
private function getFromEmail()
|
||||
{
|
||||
if(config('app.self_hosted')) {
|
||||
if (config('app.self_hosted')) {
|
||||
return config('mail.from.address');
|
||||
}
|
||||
$originalFromAddress = Str::of(config('mail.from.address'))->explode('@');
|
||||
|
||||
Reference in New Issue
Block a user