mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Convert to Symfony Mailer
This commit is contained in:
parent
0ac6c4c4d2
commit
a1403b62da
@ -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);
|
||||
});
|
||||
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
@ -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;
|
||||
});
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
@ -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;
|
||||
});
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user