views:

261

answers:

2

I'm using the cakePHP email component for sending mails from my application. Now the return-path has something like [email protected]

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

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? :)

A: 

Digging into the cake manual when you were looking at how to use the rest of the component you should have seen something like the following. This is what set the Return-Path.

$this->Email->return = '[email protected]';

Jon
+2  A: 

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

http://book.cakephp.org/view/270/Class-Attributes-and-Variables

Travis Leleu
You're totally right. Also like Jon said it's a simple $this->Email->return = '[email protected]';It tried it before but it didn't work (neither it does now, but I think I might know where the problem is situated). Seems like our mailserver is rewriting the header before sending :/
lorem monkey