Load immediately before "class FM_DBUtil" in the "Sick_Vacation-lib.php" file in the "includes" folder. ******************************************************************************************************************* ////////AutoResponseSender///////////// class FM_AutoResponseSender extends FM_ComposedMailSender { private $subject; private $template; private $namevar; private $emailvar; public function __construct($subj="",$templ="") { parent::__construct(); $this->subject = $subj; $this->template= $templ; $this->namevar= ""; $this->emailvar= ""; } function SetToVariables($name_var,$email_var) { $this->namevar= $name_var; $this->emailvar= $email_var; } function SendAutoResponse() { $name_val = ''; if(!empty($this->formvars[$this->namevar])) { $name_val = $this->formvars[$this->namevar]; } $email_val = $this->formvars[$this->emailvar]; $email_val = trim($email_val); if(empty($email_val)) { $this->logger->LogError("Email value is empty. Didn't send auto-response"); return; } $this->InitMailer(); $this->ComposeMessage($this->subject,$this->template); $name_val = trim($name_val); $to_var =''; if(!empty($name_val)) { $to_var = "$name_val<$email_val>"; } else { $to_var = $email_val; } if(!$this->ext_module->BeforeSendingAutoResponse($to_var, $this->message_subject,$this->message_body)) { $this->logger->LogInfo("The extension module stopped the auto-response to: $to_var"); return; } $this->logger->LogInfo("sending auto response to: $to_var"); $this->SendMail($this->config->from_addr,$to_var); } function Process(&$continue) { if(strlen($this->template)<=0|| strlen($this->emailvar)<=0) { $this->logger->LogError("auto response: template or emailvar is empty!"); return false; } $continue = true; $this->SendAutoResponse(); return true; } function ValidateInstallation(&$app_command_obj) { if(!$app_command_obj->IsEmailTested()) { return $app_command_obj->TestSMTPEmail(); } return true; } }