Enable system mail hold

This commit is contained in:
Deon George
2022-01-15 22:38:45 +11:00
parent 6f1d47a6ab
commit c7e6bb2575
6 changed files with 60 additions and 3 deletions

View File

@@ -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));