diff options
author | Aleksander Machniak <alec@alec.pl> | 2015-01-19 16:08:42 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2015-01-19 16:08:42 +0100 |
commit | 38dbd8022b63adfd4ff4e5eb3eb5706d8bc9def2 (patch) | |
tree | e339529fff58fe0c148f6020bbc69f29d521e352 /program/steps | |
parent | ef29153a3270dd2407cce20f3eb3ec6322d4053b (diff) |
Fix bug where Reply-To address was ignored on reply to messages sent by self (#1490233)
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/compose.inc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index d4db232ea..1731a4822 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -322,13 +322,18 @@ foreach ($parts as $header) { $fvalue = $mailfollowup; else if ($mailreplyto) $fvalue = $mailreplyto; - else if (!empty($MESSAGE->headers->replyto)) - $fvalue = $MESSAGE->headers->replyto; + else if (!empty($MESSAGE->headers->replyto)) { + $fvalue = $MESSAGE->headers->replyto; + $replyto = true; + } else if (!empty($MESSAGE->headers->from)) $fvalue = $MESSAGE->headers->from; // Reply to message sent by yourself (#1487074, #1489230) - if (!empty($ident) && in_array($ident['ident'], array($fvalue, $MESSAGE->headers->from))) { + // Reply-To address need to be unset (#1490233) + if (!empty($ident) && empty($replyto) + && in_array($ident['ident'], array($fvalue, $MESSAGE->headers->from)) + ) { $fvalue = $MESSAGE->headers->to; } } |