diff --git a/public_html/includes/base.php b/public_html/includes/base.php index 78c3a69..a5fdb52 100644 --- a/public_html/includes/base.php +++ b/public_html/includes/base.php @@ -32,7 +32,7 @@ function autoload_redonate($class_name) } } -spl_autoload_register(autoload_redonate); +spl_autoload_register('autoload_redonate'); /* Set global templater variables */ NewTemplater::SetGlobalVariable("logged-in", !empty($_SESSION['user_id'])); @@ -101,6 +101,14 @@ function flash_notice($message) $_SESSION['notices'][] = $message; } +if($cphp_config->debugmode === false) +{ + $smtp = Swift_SmtpTransport::newInstance($cphp_config->smtp->host, $cphp_config->smtp->port) + ->setUsername($cphp_config->smtp->user)->setPassword($cphp_config->smtp->pass); + + $mail_transport = Swift_Mailer::newInstance($smtp); +} + function send_mail($to, $subject, $text, $html) { global $mail_transport, $cphp_config; @@ -111,21 +119,26 @@ function send_mail($to, $subject, $text, $html) $sMessage->setBody($text); $sMessage->addPart($html, "text/html"); - echo("
{$text}-
{$text}+