Transfering netmail via EMSI

This commit is contained in:
Deon George
2021-07-17 15:48:07 +10:00
parent 6ce4e64cb6
commit 1fa566b26c
15 changed files with 226 additions and 83 deletions

View File

@@ -21,7 +21,8 @@ class Netmail extends Model
{
return $this
->setConnection('pgsql')
->belongsTo(Address::class);
->belongsTo(Address::class)
->withTrashed();
}
public function tftn()
@@ -52,6 +53,8 @@ class Netmail extends Model
{
$o = new Message;
// @todo Dont bundle mail to nodes that have been disabled, or addresses that have been deleted
$o->header = [
'onode' => $this->fftn->node_id,
'dnode' => $this->tftn->node_id,
@@ -88,6 +91,9 @@ class Netmail extends Model
// @todo Point handling FMPT/TOPT
$o->intl = sprintf('%s %s',$this->tftn->ftn3d,$this->fftn->ftn3d);
// TZUTC
$o->kludge->put('tzutc',str_replace('+','',$this->created_at->getOffsetString('')));
return $o;
}
}