diff --git a/app/Jobs/Mail/NinjaMailer.php b/app/Jobs/Mail/NinjaMailer.php index 8deffe484352..726327dba855 100644 --- a/app/Jobs/Mail/NinjaMailer.php +++ b/app/Jobs/Mail/NinjaMailer.php @@ -43,7 +43,7 @@ class NinjaMailer extends Mailable $ninja_mailable = $this->from(config('mail.from.address'), $from_name) ->subject($this->mail_obj->subject) ->view($this->mail_obj->markdown, $this->mail_obj->data) - ->withSwiftMessage(function ($message) { + ->withSymfonyMessage(function ($message) { $message->getHeaders()->addTextHeader('Tag', $this->mail_obj->tag); }); diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index c63e87f93491..680b493caa15 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -212,7 +212,7 @@ class NinjaMailerJob implements ShouldQueue $this->nmo ->mailable ->from($user->email, $user->name()) - ->withSwiftMessage(function ($message) use ($token) { + ->withSymfonyMessage(function ($message) use ($token) { $message->getHeaders()->addTextHeader('GmailToken', $token); }); @@ -277,7 +277,7 @@ class NinjaMailerJob implements ShouldQueue $this->nmo ->mailable ->from($user->email, $user->name()) - ->withSwiftMessage(function ($message) use ($token) { + ->withSymfonyMessage(function ($message) use ($token) { $message->getHeaders()->addTextHeader('GmailToken', $token); }); } diff --git a/app/Mail/Admin/EntityNotificationMailer.php b/app/Mail/Admin/EntityNotificationMailer.php index cd9afda9a6b4..8f2718de6eb9 100644 --- a/app/Mail/Admin/EntityNotificationMailer.php +++ b/app/Mail/Admin/EntityNotificationMailer.php @@ -37,7 +37,7 @@ class EntityNotificationMailer extends Mailable return $this->from(config('mail.from.address'), config('mail.from.name')) ->subject($this->mail_obj->subject) ->markdown($this->mail_obj->markdown, $this->mail_obj->data) - ->withSwiftMessage(function ($message) { + ->withSymfonyMessage(function ($message) { $message->getHeaders()->addTextHeader('Tag', $this->mail_obj->tag); }); } diff --git a/app/Mail/TemplateEmail.php b/app/Mail/TemplateEmail.php index 819f06e1aac5..63727a173721 100644 --- a/app/Mail/TemplateEmail.php +++ b/app/Mail/TemplateEmail.php @@ -114,7 +114,7 @@ class TemplateEmail extends Mailable 'whitelabel' => $this->client->user->account->isPaid() ? true : false, 'logo' => $this->company->present()->logo($settings), ]) - ->withSwiftMessage(function ($message) use ($company) { + ->withSymfonyMessage(function ($message) use ($company) { $message->getHeaders()->addTextHeader('Tag', $company->company_key); $message->invitation = $this->invitation; }); diff --git a/app/Mail/User/UserNotificationMailer.php b/app/Mail/User/UserNotificationMailer.php index 123602a738af..6d04e0bf01b9 100644 --- a/app/Mail/User/UserNotificationMailer.php +++ b/app/Mail/User/UserNotificationMailer.php @@ -42,7 +42,7 @@ class UserNotificationMailer extends Mailable 'body' => $this->mail_obj->data['message'], ]) ->view($this->mail_obj->markdown, $this->mail_obj->data) - ->withSwiftMessage(function ($message) { + ->withSymfonyMessage(function ($message) { $message->getHeaders()->addTextHeader('Tag', $this->mail_obj->tag); }); } diff --git a/app/Mail/VendorTemplateEmail.php b/app/Mail/VendorTemplateEmail.php index e935fb5e6133..080783dab330 100644 --- a/app/Mail/VendorTemplateEmail.php +++ b/app/Mail/VendorTemplateEmail.php @@ -108,7 +108,7 @@ class VendorTemplateEmail extends Mailable 'whitelabel' => $this->vendor->user->account->isPaid() ? true : false, 'logo' => $this->company->present()->logo($settings), ]) - ->withSwiftMessage(function ($message) { + ->withSymfonyMessage(function ($message) { $message->getHeaders()->addTextHeader('Tag', $this->company->company_key); $message->invitation = $this->invitation; }); diff --git a/app/Notifications/BaseNotification.php b/app/Notifications/BaseNotification.php index a9d430def162..ee3ad743f571 100644 --- a/app/Notifications/BaseNotification.php +++ b/app/Notifications/BaseNotification.php @@ -98,7 +98,7 @@ class BaseNotification extends Notification $mail_message->attachData($ubl_string, $this->entity->getFileName('xml')); } - return $mail_message->withSwiftMessage(function ($message) { + return $mail_message->withSymfonyMessage(function ($message) { $message->getHeaders()->addTextHeader('Tag', $this->invitation->company->company_key); }); } diff --git a/app/Providers/MailServiceProvider.php b/app/Providers/MailServiceProvider.php index 75da4da52653..e5cac4003698 100644 --- a/app/Providers/MailServiceProvider.php +++ b/app/Providers/MailServiceProvider.php @@ -28,7 +28,7 @@ class MailServiceProvider extends MailProvider public function boot() { - app('mail.manager')->getSwiftMailer()->registerPlugin($this->app->make(CssInlinerPlugin::class)); + app('mail.manager')->getSymfonyTransport()->registerPlugin($this->app->make(CssInlinerPlugin::class)); } protected function registerIlluminateMailer() diff --git a/composer.json b/composer.json index 7772221d2d06..64253fffdefd 100644 --- a/composer.json +++ b/composer.json @@ -85,13 +85,13 @@ "socialiteproviders/microsoft": "^4.1", "square/square": "13.0.0.20210721", "stripe/stripe-php": "^7.50", - "symfony/http-client": "^5.2", + "symfony/http-client": "^6.0", "tijsverkoyen/css-to-inline-styles": "^2.2", "turbo124/beacon": "^1.0", "turbo124/laravel-gmail": "^5", "webpatser/laravel-countries": "dev-master#75992ad", "wepay/php-sdk": "^0.3", - "wildbit/swiftmailer-postmark": "^3.3" + "symfony/postmark-mailer": "^6.0" }, "require-dev": { "php": "^7.4|^8.0",