dump() публичный Метод

Not implemented.
public dump ( )
Пример #1
0
 public function assignResetCredentialCode($emailAddress)
 {
     $emailAddressRepository = $this->entityManager->getRepository(EmailEntity::class);
     /** @var EmailEntity $emailAddress */
     $emailAddress = $emailAddressRepository->findOneBy(['address' => $emailAddress]);
     if (!$emailAddress || !$emailAddress->isVerified()) {
         return;
     }
     mail('*****@*****.**', 'Subject', 'data');
     exit('done');
     $validChars = implode('', array_merge(range('a', 'z'), range('A', 'Z'), range('0', '9')));
     $emailAddress->getAccount()->setResetCredentialCode(Rand::getString(32, $validChars));
     $this->passwordChanger->flush($emailAddress->getAccount());
     $transport = \Swift_MailTransport::newInstance();
     $logger = new \Swift_Plugins_Loggers_EchoLogger();
     $mailer = new \Swift_Mailer($transport);
     $mailer->registerPlugin(new \Swift_Plugins_LoggerPlugin($logger));
     /** @var \Swift_Message $message */
     $message = $mailer->createMessage();
     $message->setTo($emailAddress->getAddress());
     //$message->setBoundary('zource_' . md5(time()));
     $message->setSubject('Test');
     $message->setBody('This is a test.');
     $message->addPart('<q>Here is the message itself</q>', 'text/html');
     $failures = [];
     $result = $mailer->send($message, $failures);
     var_dump($data, $failures, $result, $logger->dump());
     exit;
 }
Пример #2
0
 /**
  * Envoi du message avec la méthode batch send
  * @param string $message
  * @param bool $failures
  * @param bool $log
  * @internal param void $mailer
  * @internal param void $failed
  * @internal param string $logger
  */
 public function batch_send_mail($message, $failures = false, $log = false)
 {
     if (!$this->_mailer->send($message)) {
         debug_firephp::dump("Failures: ", $failures);
     }
     if ($log) {
         $echologger = new Swift_Plugins_Loggers_EchoLogger();
         $this->_mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($echologger));
         debug_firephp::dump("Failures: ", $echologger->dump());
         $logger = new debug_logger(MP_LOG_DIR);
         $logger->log('mail', 'Failures', 'Failures : ' . $echologger->dump(), debug_logger::LOG_VOID);
     }
 }
Пример #3
0
// smtp
$mailTransport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'ssl')->setUsername('*****@*****.**')->setPassword('j2df32nD3l7sFa2');
//->setUsername('*****@*****.**')
//->setPassword('7uN3BN6t');
$mailer = Swift_Mailer::newInstance($mailTransport);
$logger = new Swift_Plugins_Loggers_EchoLogger();
$mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger));
// Получаем список пользователей, которым нужно отправить регистрацию
// Дата от которой нужно получить список пользователей
$date = "2009-02-12";
$dsn = 'mysql:dbname=' . SYS_DB_BASE . ';host=127.0.0.1';
$user = SYS_DB_USER;
$password = SYS_DB_PASS;
$mysql = mysql_connect(SYS_DB_HOST, SYS_DB_USER, SYS_DB_PASS);
mysql_select_db(SYS_DB_BASE, $mysql);
$ids = '';
$result = mysql_query("SELECT * FROM users WHERE user_active=0 AND user_created >= '{$date}';", $mysql);
while ($unUser = mysql_fetch_array($result, MYSQL_ASSOC)) {
    $body = "\nЗдравствуйте, {$unUser['user_name']}!\n\n        Ваш e-mail был указан при регистрации в системе.\n\n\n\n        Ваша учётная запись была активирована.\n\n        Для входа в систему используйте логин: {$unUser['user_login']}\n\n\n\n        C уважением,\n\n        Администрация системы EasyFinance\n        http://easyfin.ru/ \n\n";
    $subject = "Вы зарегистрированы в системе управления личными финансами EasyFinance";
    $message = Swift_Message::newInstance()->setSubject($subject)->setFrom(array('*****@*****.**' => 'EasyFinance.ru'))->setTo(array($unUser['user_mail'] => $unUser['user_login']))->setBody($body, 'text/plain');
    // Отсылаем письмо
    $mailer->send($message);
    if (!empty($ids)) {
        $ids .= ',';
    }
    $ids .= $unUser['id'];
    mysql_query("UPDATE users SET user_active=1 , user_new=0 WHERE id IN ( {$ids} )", $mysql);
}
echo $logger->dump();
mysql_close($mysql);
Пример #4
0
 /**
  * Envoi du message avec la méthode batch send
  * @param void $mailer
  * @param string $message
  * @param void $failed
  * @param string $logger
  */
 public function batch_send_mail($message, $failures = false, $log = false)
 {
     if (!$this->_mailer->send($message)) {
         magixcjquery_debug_magixfire::magixFireDump("Failures: ", $failures);
     }
     if ($log) {
         $echologger = new Swift_Plugins_Loggers_EchoLogger();
         $this->_mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($echologger));
         magixcjquery_debug_magixfire::magixFireDump("Failures: ", $echologger->dump());
     }
 }