Пример #1
0
 public function echoTable()
 {
     Run::$DEBUG_PRINT = true;
     echo $this->getTable();
     //Debug::p($this->model->dataList);
     //Debug::p($this->listOrderFields);
     //Debug::p($this->model->schema['fields']);
 }
Пример #2
0
 function __construct()
 {
     //Run::$DEBUG_PRINT = true;
     Debug::log("Iniciando Core/Debug.", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
     if (isset($_GET['debug-print'])) {
         Run::$DEBUG_PRINT = true;
     }
 }
Пример #3
0
<?php

Run::$DEBUG_PRINT = true;
require_once RUN_PATH . "libraries/phpmailer/PHPMailerAutoload.php";
Run::loadHelper("mailManager/mailManager");
// ********************************************************************************************************************************
class MailSender
{
    private $mailManager = NULL;
    //-----------------------------------------------------------------------------------------------------------------------------
    function MailSender($mailManager = null)
    {
        Debug::log("Iniciando MailManager/MailSender.", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
        if (!$mailManager) {
            $mailManager = new mailManager();
        }
        $this->mailManager = $mailManager;
        return $this;
    }
    //-------------------------------------------------------------------------------------------------------------------------
    public function send()
    {
        $resposta = false;
        $mail = new PHPMailer();
        flush();
        ob_start();
        //Debug::p("CONTEUDO", Run::$control->string->encodeFixUtf8($this->mailManager->content_html));
        //exit;
        //$mail->IsSendmail(); // telling the class to use SendMail transport
        $mail->IsSMTP();
        // usando função padrão de email php
Пример #4
0
 public function periodicAutoSendMail()
 {
     Run::$DEBUG_PRINT = true;
     $t = (int) Run::CRON_JOB_TIME;
     $time_exe = $t * 60 + 30 + Run::MAIL_AUTO_SEND_LIMIT * 3;
     set_time_limit($time_exe);
     ob_flush();
     flush();
     Debug::p("time_exe (t=" . $t . ")", $time_exe);
     ob_flush();
     flush();
     Run::$benchmark->mark("periodicAutoSendMail/Inicio");
     for ($n = 0; $n <= $t; $n++) {
         $result = $this->triggerPeriodicAutoSendMail();
         if ($result !== true) {
             break;
         }
         Run::$benchmark->writeMark("periodicAutoSendMail/Inicio", "periodicAutoSendMail/loop{$t}");
         sleep(60 - Run::MAIL_AUTO_SEND_LIMIT * 3);
     }
     Run::$benchmark->writeMark("periodicAutoSendMail/Inicio", "periodicAutoSendMail/final");
     Debug::p("periodicAutoSendMail finalizado");
     exit;
 }