Enable system mail hold
This commit is contained in:
@@ -230,6 +230,12 @@ final class Send extends Item
|
||||
*/
|
||||
public function mail(Address $ao): void
|
||||
{
|
||||
// If the node is marked as hold - dont send any mail.
|
||||
if ($ao->system->hold) {
|
||||
Log::info(sprintf('%s: - System [%d] mail is marked as hold - not checking for mail.',self::LOGKEY,$ao->system_id));
|
||||
return;
|
||||
}
|
||||
|
||||
// Netmail
|
||||
if ($x=$ao->getNetmail()) {
|
||||
Log::debug(sprintf('%s: - Netmail(s) added for sending to [%s]',self::LOGKEY,$ao->ftn));
|
||||
|
@@ -258,7 +258,7 @@ class SystemController extends Controller
|
||||
public function add_edit(SystemRegister $request,System $o)
|
||||
{
|
||||
if ($request->post()) {
|
||||
foreach (['name','location','sysop','phone','address','port','active','method','notes','mailer_type','mailer_address','mailer_port','zt_id'] as $key)
|
||||
foreach (['name','location','sysop','hold','phone','address','port','active','method','notes','mailer_type','mailer_address','mailer_port','zt_id'] as $key)
|
||||
$o->{$key} = $request->post($key);
|
||||
|
||||
$o->save();
|
||||
|
@@ -46,6 +46,7 @@ class SystemRegister extends FormRequest
|
||||
],
|
||||
($this->so->exists || ($request->action != 'create')) ? [
|
||||
'location' => 'required|min:3',
|
||||
'hold' => 'required|boolean',
|
||||
'sysop' => 'required|min:3',
|
||||
'phone' => 'nullable|regex:/^([0-9-]+)$/',
|
||||
'address' => 'nullable|regex:/^(?!:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$/i',
|
||||
|
Reference in New Issue
Block a user