mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for invoiceemailengine
This commit is contained in:
parent
8d0b9fef1f
commit
329d3595ba
@ -138,8 +138,6 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
$mailer->mailgun_config($this->client_mailgun_secret, $this->client_mailgun_domain);
|
$mailer->mailgun_config($this->client_mailgun_secret, $this->client_mailgun_domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
nlog($this->nmo->to_user->email);
|
|
||||||
|
|
||||||
$mailer
|
$mailer
|
||||||
->to($this->nmo->to_user->email)
|
->to($this->nmo->to_user->email)
|
||||||
->send($this->nmo->mailable);
|
->send($this->nmo->mailable);
|
||||||
@ -395,9 +393,8 @@ nlog($this->nmo->to_user->email);
|
|||||||
* as the Mailer
|
* as the Mailer
|
||||||
*/
|
*/
|
||||||
private function setPostmarkMailer()
|
private function setPostmarkMailer()
|
||||||
{nlog("configuring postmark");
|
{
|
||||||
if(strlen($this->nmo->settings->postmark_secret) > 2){
|
if(strlen($this->nmo->settings->postmark_secret) > 2){
|
||||||
nlog($this->nmo->settings->postmark_secret);
|
|
||||||
$this->client_postmark_secret = $this->nmo->settings->postmark_secret;
|
$this->client_postmark_secret = $this->nmo->settings->postmark_secret;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -409,8 +406,7 @@ nlog($this->nmo->to_user->email);
|
|||||||
|
|
||||||
$sending_email = (isset($this->nmo->settings->custom_sending_email) && stripos($this->nmo->settings->custom_sending_email, "@")) ? $this->nmo->settings->custom_sending_email : $user->email;
|
$sending_email = (isset($this->nmo->settings->custom_sending_email) && stripos($this->nmo->settings->custom_sending_email, "@")) ? $this->nmo->settings->custom_sending_email : $user->email;
|
||||||
$sending_user = (isset($this->nmo->settings->email_from_name) && strlen($this->nmo->settings->email_from_name) > 2) ? $this->nmo->settings->email_from_name : $user->name();
|
$sending_user = (isset($this->nmo->settings->email_from_name) && strlen($this->nmo->settings->email_from_name) > 2) ? $this->nmo->settings->email_from_name : $user->name();
|
||||||
nlog($sending_email);
|
|
||||||
nlog($sending_user);
|
|
||||||
$this->nmo
|
$this->nmo
|
||||||
->mailable
|
->mailable
|
||||||
->from($sending_email, $sending_user);
|
->from($sending_email, $sending_user);
|
||||||
@ -653,9 +649,6 @@ nlog($sending_user);
|
|||||||
public function failed($exception = null)
|
public function failed($exception = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if($exception)
|
|
||||||
nlog($exception->getMessage());
|
|
||||||
|
|
||||||
config(['queue.failed.driver' => null]);
|
config(['queue.failed.driver' => null]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -213,8 +213,8 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -94,7 +94,7 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
});
|
});
|
||||||
|
|
||||||
Mailer::macro('postmark_config', function (string $postmark_key) {
|
Mailer::macro('postmark_config', function (string $postmark_key) {
|
||||||
nlog($postmark_key);
|
|
||||||
Mailer::setSymfonyTransport(app('mail.manager')->createSymfonyTransport([
|
Mailer::setSymfonyTransport(app('mail.manager')->createSymfonyTransport([
|
||||||
'transport' => 'postmark',
|
'transport' => 'postmark',
|
||||||
'token' => $postmark_key
|
'token' => $postmark_key
|
||||||
|
Loading…
x
Reference in New Issue
Block a user