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

@@ -195,7 +195,7 @@ class Message extends FTNBase
if (($x=$o->validate($domain))->fails()) {
Log::debug('Message fails validation',['result'=>$x->errors()]);
throw new \Exception('Message validation fails:'.join(' ',$x->errors()->all()));
//throw new \Exception('Message validation fails:'.join(' ',$x->errors()->all()));
}
return $o;
@@ -249,7 +249,7 @@ class Message extends FTNBase
case 'date':
return Carbon::createFromFormat('d M y H:i:s O',
sprintf('%s %s',chop(Arr::get($this->header,$key)),($x=$this->kludge->get('tzutc')) < 0 ? $x : '+'.$x));
sprintf('%s %s',chop(Arr::get($this->header,$key)),(is_null($x=$this->kludge->get('tzutc')) || ($x < 0)) ? $x : '+'.$x));
case 'flags':
case 'cost': return Arr::get($this->header,$key);
@@ -404,7 +404,7 @@ class Message extends FTNBase
foreach ($this->_kludge as $k=>$v) {
if ($x=$this->kludge->get($k))
$return .= sprintf("\01%s %s\r",$v,$x);
$return .= sprintf("\01%s%s\r",$v,$x);
}
$return .= $this->message."\r";