Post by jerry0000 » Fri Sep 18, 2015 5:17 am

v 2.0.3.1, in system/libary/mail.php, line 103-107:

Code: Select all

		if (!$this->reply_to) {
			$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;
		} else {
			$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->reply_to) . '?=' . ' <' . $this->from . '>' . $this->newline;
		}
I believe the "else" part is wrong. It should be:

Code: Select all

$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->reply_to . '>' . $this->newline;
Last edited by jerry0000 on Sun Sep 20, 2015 5:29 am, edited 1 time in total.

Newbie

Posts

Joined
Tue Jan 08, 2013 2:37 am

Post by deepvision » Fri Sep 18, 2015 1:59 pm

No, it is correct.
The second line executes only when the following condition is false:

Code: Select all

if (!$this->reply_to) {
It happens only when $this->reply_to has been defined. Because of the NOT logical operator: !

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by jerry0000 » Sat Sep 19, 2015 6:00 am

Please read it again. I actually tested and the original code is WRONG. My modified works. I know the NOT (!) operator there.

The original code will have the reply-to set as

Code: Select all

reply-to.email@domain2.com <from.email@domain1.com>
, which is incorrectly configured, as it will STILL reply to from.email@domain1.com! As you see, the mail program only cares the email inside the <>, if there are <> followed by the text field. In this case, the mail program treats the email address before the <> as SIMPLE text, where the sender name should be.

The correct reply to filed should be

Code: Select all

sender <repl-to.email@domain2.com>
.

Newbie

Posts

Joined
Tue Jan 08, 2013 2:37 am

Post by deepvision » Sat Sep 19, 2015 1:01 pm

It probably would have been more clear if you simply sent the modified code and not just referenced to the "second line"

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by jerry0000 » Sun Sep 20, 2015 5:30 am

I revised my wording, saying the "else" part is wrong.

Newbie

Posts

Joined
Tue Jan 08, 2013 2:37 am

Post by deepvision » Sun Sep 20, 2015 12:25 pm

Yes, you are right :)

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am
Who is online

Users browsing this forum: No registered users and 5 guests