php - Symfony/Swiftmailer 电子邮件未发送且无日志

标签 php symfony email swiftmailer mailjet

我在尝试通过 swiftmailer 和 mailjet 作为 SMTP 服务器发送电子邮件时遇到问题。一切都曾经完美地工作,然后有些东西坏了。我正在尝试找出问题所在。

文档似乎说 swiftmailer 在 Debug模式下生成日志。 http://symfony.com/doc/current/reference/configuration/swiftmailer.html#logging

所以我在app.php中激活了 Debug模式

<?php

use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\HttpFoundation\Request;

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
Debug::enable();

require_once __DIR__.'/../app/AppKernel.php';

$kernel = new AppKernel('prod', true);

// ...

当我启动命令时,一切看起来都很完美

sudo -u www-data php app/console swiftmailer:spool:send --env=prod
[2015-11-20 22:14:47] Processing default mailer... 6 emails sent

但是没有收到电子邮件,mailjet 仪表板显示没有电子邮件发送给它。 日志中没有任何内容。

那么 swiftmailer 应该在哪里写入它的日志?

我已经阅读了this但如果可能的话,我不想改变我的代码。另外,我假设如果 swiftmailer 提供了一个日志记录参数,它可以写一些日志。

顺便说一句,通过 Gmail 发送电子邮件效果很好,但仍然不会生成任何日志

感谢您的帮助!

最佳答案

我在 Mailjet 领导开发者关系。

您能否通过 dev@mailjet.com 的电子邮件与我们联系,向我们提供有关您的 Mailjet 帐户的更多详细信息,以便我们检查我们这边的一切是否正常?

谢谢

关于php - Symfony/Swiftmailer 电子邮件未发送且无日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33837916/

相关文章:

php - 如何从 Laravel 5 中的模块/目录获取路由列表?

php - 删除 Symfony 中父类的映射学说字段 [FOSUserBundle]

symfony - 覆盖 FOSUserBundle 路由 Symfony2

iphone - 在 mailto : URL on an iPhone 中包含一个 HTML img 标签

php - 使用 Swiftmailer 发送多个附件

php - 未定义索引错误(来自数据库)

php - Cakephp SMTP 电子邮件语法错误

IOS后台发邮件

php - Azure Web App 的 phpinfo 中显示的 PHP 版本错误

php - Symfony 表单错误 - 名称为空的表单不能有父表单