芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/cloud.pulsehost.co.uk/modules/Mail/Crons/scheduled_autoresponder.php
oModuleSettings->AllowScheduledAutoresponder) { $accounts = Models\MailAccount::where('Properties->' . 'Mail::AutoresponderScheduled', true) ->where('Properties->' . 'Mail::AutoresponderStart', '<', time())->get(); $sieveManager = Module::getInstance()->getSieveManager(); foreach ($accounts as $account) { /** @var \Aurora\Modules\Mail\Models\MailAccount $account */ log('Process account: ' . $account->Id); $end = $account->getExtendedProp('Mail::AutoresponderEnd'); $disableAutoResponder = ($end !== null && $end < time()); if ($disableAutoResponder) { log('Disable scheduled autoresponder'); $account->setExtendedProp('Mail::AutoresponderScheduled', false); $account->save(); } $autoResponder = $sieveManager->getAutoresponder($account); if ($autoResponder) { if ($disableAutoResponder) { log('Disable autoresponder'); $sieveManager->setAutoresponder($account, $autoResponder['Subject'], $autoResponder['Message'], false); } elseif (!$autoResponder['Enable']) { log('Enable autoresponder'); $sieveManager->setAutoresponder($account, $autoResponder['Subject'], $autoResponder['Message'], true); } } else { log('Autoresponder not found'); } } } else { log('Scheduled autoresponder disabled'); }