Example #1
0
 private static function sendAutoResponseEmail($mailer)
 {
     $senderEmail = Form::getSenderEmail();
     $body = Form::getAutoResponseMailBody();
     if (empty($senderEmail) || empty($body)) {
         return false;
     }
     $mailer->From = Form::getFromEmail(true);
     $mailer->FromName = Form::getFromName(true);
     $mailer->TO = $senderEmail;
     $mailer->CC = '';
     //Form::getToEmail();
     $mailer->BCC = '';
     $replyTo = Form::getReplyToEmail();
     if (!empty($replyTo)) {
         $mailer->ReplyTo = $replyTo;
         $mailer->ReplyToName = Form::getReplyToName();
     }
     $mailer->Subject = Form::getAutoResponseMailSubject();
     $mailer->Body = $body;
     return $mailer->Send();
 }
 public function validateForm($post = array())
 {
     if (!Form::isValidated()) {
         Form::validate($post);
     }
     $this->From = Form::getFromEmail();
     $this->FromName = Form::getFromName();
     $this->Subject = Form::getMailSubject();
     $this->Body = Form::getMailBody();
     $email = $this->config['email'];
     $this->TO = Form::getToEmail();
     $this->CC = empty($email['cc']) ? '' : $email['cc'];
     $this->BCC = empty($email['bcc']) ? '' : $email['bcc'];
 }