Example #1
0
 /**
  * Action to send test email notification
  *
  * @return void
  */
 protected function doActionTestEmail()
 {
     $request = \XLite\Core\Request::getInstance();
     $error = \XLite\Core\Mailer::sendTestEmail($request->test_from_email_address, $request->test_to_email_address, $request->test_email_body);
     if ($error) {
         \XLite\Core\Session::getInstance()->test_email_error = $error;
         \XLite\Core\TopMessage::getInstance()->addError('Error of test e-mail sending: ' . $error);
     } else {
         \XLite\Core\TopMessage::getInstance()->add('Test e-mail have been successfully sent');
     }
     $this->setReturnURL($this->buildURL('settings', '', array('page' => static::EMAIL_PAGE)));
 }