【发布时间】:2016-10-09 18:44:07
【问题描述】:
早上好。
我想测试在我的 Symfony 命令中发送电子邮件。
我的电子邮件是通过\Swift_Mailer 发送的
$this->mailer->send($message);
我尝试使用这个:
http://symfony.com/doc/current/cookbook/email/testing.html
但是 $this->client->getProfile() 和 Symfony Response 在 Symfony 命令中不可用。
Argument 1 passed to Symfony\Component\HttpKernel\Profiler\Profiler::loadProfileFromResponse() must be an instance of Symfony\Component\HttpFoundation\Response, null given,
现在我如何验证我的电子邮件是否正确发送?
【问题讨论】:
-
请提供一些您目前拥有的代码示例...
-
if ($this->mailer->send($message))