Welcome Guest, Not a member yet? Register   Sign In
Email Class - Not able to set Return-Path header
#1

[eluser]MeanStudios[/eluser]
Greetings,

I'm trying to send out an email where I change the 'Return-Path' header to something other than the 'From' email address but I am having no luck. In the libraries/Email.php file I've commented out line 201:
Code:
$this->_set_header('Return-Path', '<'.$from.'>');
and then in my controller I did:
Code:
$this->email->_set_header('Return-Path', '<[email protected]>');
but this did not work. It's still setting the return path to the 'From' address hence sending bounce-back emails to that address instead of the address I'm trying to nominate for the 'Return-Path'.

Here is the output:
Code:
220 mail.alpha.net.au ESMTP AlphaMailServices MTA: Wed, 8 Jul 2009 17:00:05 +1000

hello: 250-mail.alpha.net.au Hello gateway2.alpha.net.au [203.41.44.5], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 15000000
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP

from: 250 2.1.0 ... Sender ok

to: 250 2.1.5 ... Recipient ok

data: 354 Enter mail, end with "." on a line by itself

250 2.0.0 n68705NG002766 Message accepted for delivery

quit: 221 2.0.0 mail.alpha.net.au closing connection

Your message has been successfully sent using the following protocol: smtp

User-Agent: CodeIgniter
Date: Wed, 8 Jul 2009 17:00:03 +1000
From: "Cody Lundquist"
Reply-To: "Cody Lundquist"
To: cody@4
Return-Path:
Subject: =?utf-8?Q?df?=
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

<p>sdf</p>
As you can see there, the Return-Path is blank. Although if I uncomment out the line I said above and remove my '_set_header()' method it's still blank. Which leaves me to believe that CodeIgniter is not even sending it in the first place and the mail server is using the 'From' address since 'Return-Path' is blank. If I do something like
Code:
$this->email->_set_header('Custom-Header', '<[email protected]>');
it's still blank when using
Code:
echo $this->email->print_debugger();
but the bounceback I receive from the server has that 'Custom-Header' set correctly.

So this is very weird....


Messages In This Thread
Email Class - Not able to set Return-Path header - by El Forum - 07-08-2009, 01:04 AM
Email Class - Not able to set Return-Path header - by El Forum - 07-08-2009, 01:22 AM
Email Class - Not able to set Return-Path header - by El Forum - 07-09-2009, 07:57 AM
Email Class - Not able to set Return-Path header - by El Forum - 07-09-2009, 03:37 PM
Email Class - Not able to set Return-Path header - by El Forum - 07-09-2009, 08:04 PM
Email Class - Not able to set Return-Path header - by El Forum - 08-10-2009, 09:52 PM
Email Class - Not able to set Return-Path header - by El Forum - 08-10-2009, 10:21 PM
Email Class - Not able to set Return-Path header - by El Forum - 08-10-2009, 11:00 PM
Email Class - Not able to set Return-Path header - by El Forum - 08-11-2009, 08:56 AM
Email Class - Not able to set Return-Path header - by El Forum - 09-10-2009, 03:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB