getUserInput('alternate_email', '', UserInput::STRING); } /** * @return void * @throws AjaxException * @throws NotificationException */ public function execute(): void { $recipient = $this->getRecipient(); if (!Factory::getSettingsNotifications()->isEmailsEnabled()) throw new AjaxException("Email System is disabled"); if (!Helper::validateEmail($recipient)) throw new AjaxException("Email from ($recipient) invalid!"); Email::send( $recipient, 'JetBackup Test Email', 'This is a test email'); $this->setResponseMessage('Email sent!'); } }