diff --git a/airtime_mvc/application/models/Email.php b/airtime_mvc/application/models/Email.php index 234f20397..774617c1e 100644 --- a/airtime_mvc/application/models/Email.php +++ b/airtime_mvc/application/models/Email.php @@ -12,65 +12,8 @@ class Application_Model_Email */ public static function send($subject, $message, $tos, $from = null) { - $mailServerConfigured = Application_Model_Preference::GetMailServerConfigured() == true ? true : false; - $mailServerRequiresAuth = Application_Model_Preference::GetMailServerRequiresAuth() == true ? true : false; - $success = true; - if ($mailServerConfigured) { - $mailServer = Application_Model_Preference::GetMailServer(); - $mailServerPort = Application_Model_Preference::GetMailServerPort(); - if (!empty($mailServerPort)) { - $port = $mailServerPort; - } - - if ($mailServerRequiresAuth) { - $username = Application_Model_Preference::GetMailServerEmailAddress(); - $password = Application_Model_Preference::GetMailServerPassword(); - - $config = array( - 'auth' => 'login', - 'ssl' => 'ssl', - 'username' => $username, - 'password' => $password - ); - } else { - $config = array( - 'ssl' => 'tls' - ); - } - - if (isset($port)) { - $config['port'] = $port; - } - - $transport = new Zend_Mail_Transport_Smtp($mailServer, $config); - } - - $mail = new Zend_Mail('utf-8'); - $mail->setSubject($subject); - $mail->setBodyText($message); - - foreach ((array) $tos as $to) { - $mail->addTo($to); - } - - if ($mailServerConfigured) { - $mail->setFrom(isset($from) ? $from : Application_Model_Preference::GetMailServerEmailAddress()); - try { - $mail->send($transport); - } catch (Exception $e) { - $success = false; - } - } else { - $mail->setFrom(isset($from) ? $from : Application_Model_Preference::GetSystemEmail()); - try { - $mail->send(); - } catch (Exception $e) { - $success = false; - } - } - - return $success; + return mail($tos, $subject, $message); } } diff --git a/airtime_mvc/application/views/scripts/form/login.phtml b/airtime_mvc/application/views/scripts/form/login.phtml index e8d80a84d..c286c45be 100644 --- a/airtime_mvc/application/views/scripts/form/login.phtml +++ b/airtime_mvc/application/views/scripts/form/login.phtml @@ -31,10 +31,10 @@ element->getElement('csrf') ?> - -
- -
+ +
+ +
element->getElement('captcha') ?>