mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 11:04:41 -04:00
Fixes for mailers
This commit is contained in:
parent
49e1a13b53
commit
fee346e723
@ -101,6 +101,7 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
//send email
|
//send email
|
||||||
try {
|
try {
|
||||||
nlog("trying to send to {$this->nmo->to_user->email} ". now()->toDateTimeString());
|
nlog("trying to send to {$this->nmo->to_user->email} ". now()->toDateTimeString());
|
||||||
|
nlog("Using mailer => ". $this->mailer);
|
||||||
|
|
||||||
Mail::mailer($this->mailer)
|
Mail::mailer($this->mailer)
|
||||||
->to($this->nmo->to_user->email)
|
->to($this->nmo->to_user->email)
|
||||||
@ -146,11 +147,7 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
{
|
{
|
||||||
/* Singletons need to be rebooted each time just in case our Locale is changing*/
|
/* Singletons need to be rebooted each time just in case our Locale is changing*/
|
||||||
App::forgetInstance('translator');
|
App::forgetInstance('translator');
|
||||||
// App::forgetInstance('mail.manager'); //singletons must be destroyed!
|
|
||||||
// App::forgetInstance('mailer');
|
|
||||||
// App::forgetInstance('laravelgmail');
|
|
||||||
$t = app('translator');
|
$t = app('translator');
|
||||||
/* Inject custom translations if any exist */
|
|
||||||
$t->replace(Ninja::transformTranslations($this->nmo->settings));
|
$t->replace(Ninja::transformTranslations($this->nmo->settings));
|
||||||
|
|
||||||
switch ($this->nmo->settings->email_sending_method) {
|
switch ($this->nmo->settings->email_sending_method) {
|
||||||
@ -165,7 +162,6 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
(new MailServiceProvider(app()))->register();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function setGmailMailer()
|
private function setGmailMailer()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user