Пример #1
0
 function trx_mailer($config = null)
 {
     if (empty($config)) {
         $config = trx_config();
     }
     $mail = new PHPMailer();
     if ($config->smtp) {
         $mail->isSMTP();
         $mail->SMTPAuth = true;
         if (!empty($config->smtp->secure)) {
             $mail->SMTPSecure = $config->smtp->secure;
         }
         $mail->Host = $config->smtp->host;
         $mail->Username = $config->smtp->username;
         $mail->Password = $config->smtp->password;
         $mail->Port = $config->smtp->port;
     }
     $mail->CharSet = 'utf-8';
     $mail->From = $config->from;
     $mail->FromName = $config->fromName;
     return $mail;
 }
Пример #2
0
function listAction()
{
    $yandexConfig = trx_config('checker');
    echo json_encode($yandexConfig);
}