如何在cakePHP电子邮件组件中重写或设置返回路径? [英] How to rewrite or set the Return-Path in cakePHP Email Component?

查看:118
本文介绍了如何在cakePHP电子邮件组件中重写或设置返回路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用cakePHP电子邮件组件从我的应用程序发送邮件。现在return-path具有类似www@domain.tld

I'm using the cakePHP email component for sending mails from my application. Now the return-path has something like www@domain.tld

使用CakePHP组件时如何设置或重写电子邮件中的Return-Path值?

How can I set or rewrite the Return-Path value in emails when using the cakePHP Component?

在PHP中通过邮件发送邮件时,我知道该怎么做,但cakePHP电子邮件组件似乎缺少此功能...还是我缺少某些内容? :)

I know how to do it when sending mails via 'mail' in PHP but the cakePHP email component seems to missing such a feature... or am I missing something? :)

推荐答案

有一个名为EmailComponent :: return的属性,它是错误消息的返回路径。请注意,这与replyTo属性不同。

There's an attribute called EmailComponent::return that is the return path for error messages. Note that this is different than the replyTo attribute.

$this->Email->return = 'name@example.com';

http://book.cakephp.org/1.3/en/The-Manual/Core-Components/Email.html

这篇关于如何在cakePHP电子邮件组件中重写或设置返回路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆