Mail Weiterleitung / verlauf / Notizen Buchnungen

This commit is contained in:
Kevin Adametz 2021-03-31 17:55:02 +02:00
parent f1a1baa913
commit 644ec93c53
47 changed files with 663 additions and 59 deletions

View file

@ -105,6 +105,7 @@ class CustomerMail extends Model
'send' => 'bool',
'fail' => 'bool',
'recipient' => 'array',
'forward' => 'array',
'cc' => 'array',
'bcc' => 'array'
];
@ -135,6 +136,7 @@ class CustomerMail extends Model
'send',
'fail',
'error',
'forward',
'sent_at',
'scheduled_at',
'delivered_at'
@ -188,4 +190,23 @@ class CustomerMail extends Model
if(!$this->attributes['created_at']){ return ""; }
return Carbon::parse($this->attributes['created_at'])->format(\Util::formatDateTimeDB());
}
public function customer_mail_deep($deep = 0){
if($this->customer_mail){
$deep = $this->customer_mail->customer_mail_deep(++$deep);
}
return $deep;
}
public function setForwardMessage($forward = [])
{
if($forward && is_array($forward)){
if(isset($this->forward) && $this->forward){
$this->forward = array_merge($this->forward , $forward);
}else{
$this->forward = $forward;
}
$this->save();
}
}
}