如何在CakePHP中获取被退回的电子邮件?

如何在CakePHP中获取被退回的电子邮件?,php,email,cakephp,Php,Email,Cakephp,我正在使用cakePHP 2.0发送电子邮件。一切正常,但如何捕捉被退回的电子邮件?我已经添加了replyTo和return,但仍然没有收到被退回的电子邮件 $this->Email->sendAs = 'both'; $this->Email->from = 'abc@xyz.com'; $this->Email->to = 'wrong@wrong.com'; $this->Email->replyTo = 'abc@xyz.com'; $th

我正在使用cakePHP 2.0发送电子邮件。一切正常,但如何捕捉被退回的电子邮件?我已经添加了replyTo和return,但仍然没有收到被退回的电子邮件

$this->Email->sendAs = 'both';
$this->Email->from = 'abc@xyz.com';
$this->Email->to = 'wrong@wrong.com';
$this->Email->replyTo = 'abc@xyz.com';
$this->Email->return = 'abc@xyz.com';
$this->Email->headers = ['Return-Path'=>'abc@xyz.com'];
$this->Email->subject = 'Test Eail';
$msg = 'Message';
$this->Email->send($msg);

这超出了CakeEmail的范围。基本上,你需要实现一些功能,在你的收件箱中监听邮件。请参阅@polyte,但在电子邮件帐户中,我没有收到反弹邮件。我只是通过代码发送电子邮件,并在电子邮件客户端(outlook等)检查电子邮件。您是否使用SMTP传输?@GregSchmidt否,使用php邮件()