Updates for failed emails
This commit is contained in:
parent
2e9d832ad1
commit
875d8ba01a
|
|
@ -806,6 +806,16 @@ class NinjaMailerJob implements ShouldQueue
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
$job_failure = null;
|
$job_failure = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if ($this->nmo->invitation) {
|
||||||
|
$this->nmo->invitation->email_error = substr($errors, 0, 150);
|
||||||
|
$this->nmo->invitation->save();
|
||||||
|
}
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
nlog("Problem saving email error: {$e->getMessage()}");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -447,4 +447,14 @@ class ProcessPostmarkWebhook implements ShouldQueue
|
||||||
return [new \Illuminate\Queue\Middleware\WithoutOverlapping($this->request['Tag'])];
|
return [new \Illuminate\Queue\Middleware\WithoutOverlapping($this->request['Tag'])];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function failed($exception = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
if($exception) {
|
||||||
|
nlog("PROCESSPOSTMARKWEBHOOK:: ". $exception->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
config(['queue.failed.driver' => null]);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@ class Invoice extends BaseModel
|
||||||
App::setLocale($locale);
|
App::setLocale($locale);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'id' => $this->company->db.":".$this->id,
|
'id' => (string)$this->company->db.":".$this->id,
|
||||||
'name' => ctrans('texts.invoice') . " " . $this->number . " | " . $this->client->present()->name() . ' | ' . Number::formatMoney($this->amount, $this->company) . ' | ' . $this->translateDate($this->date, $this->company->date_format(), $locale),
|
'name' => ctrans('texts.invoice') . " " . $this->number . " | " . $this->client->present()->name() . ' | ' . Number::formatMoney($this->amount, $this->company) . ' | ' . $this->translateDate($this->date, $this->company->date_format(), $locale),
|
||||||
'hashed_id' => $this->hashed_id,
|
'hashed_id' => $this->hashed_id,
|
||||||
'number' => $this->number,
|
'number' => $this->number,
|
||||||
|
|
@ -269,7 +269,7 @@ class Invoice extends BaseModel
|
||||||
|
|
||||||
public function getScoutKey()
|
public function getScoutKey()
|
||||||
{
|
{
|
||||||
return $this->company->db.":".$this->id;
|
return (string)$this->company->db.":".$this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEntityType()
|
public function getEntityType()
|
||||||
|
|
|
||||||
|
|
@ -903,6 +903,15 @@ class Email implements ShouldQueue
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
$job_failure = null;
|
$job_failure = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if($this->email_object->invitation){
|
||||||
|
$this->email_object->invitation->email_error = substr($errors, 0, 150);
|
||||||
|
$this->email_object->invitation->save();
|
||||||
|
}
|
||||||
|
}catch(\Throwable $e){
|
||||||
|
nlog("Problem saving email error: {$e->getMessage()}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue