diff options
author | alecpl <alec@alec.pl> | 2008-09-13 13:26:34 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-09-13 13:26:34 +0000 |
commit | 51f55bd6d2f5cbc4f9c92dd3340b5d1397cec89a (patch) | |
tree | ec546e99e8c7987edc800baffd678bf80f14a9e9 /program/steps | |
parent | 1038a66e8a6645d0c14acbe1fd1199f96a5bbbf2 (diff) |
#1485337: fill recipient on reply to address of yourself (if there's only one address found in message)
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/compose.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 0a5226e66..f32637abe 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -209,9 +209,14 @@ function rcmail_compose_headers($attrib) { $to_addresses = $IMAP->decode_address_list($fvalue); $fvalue = ''; + foreach ($to_addresses as $addr_part) { - if (!empty($addr_part['mailto']) && !in_array($addr_part['mailto'], $sa_recipients) && (!$MESSAGE->compose_from || !in_array($addr_part['mailto'], $MESSAGE->compose_from))) + if (!empty($addr_part['mailto']) + && !in_array($addr_part['mailto'], $sa_recipients) + && (!$MESSAGE->compose_from + || !in_array($addr_part['mailto'], $MESSAGE->compose_from) + || count($to_addresses)==1)) // allow reply to yourself { $fvalue .= (strlen($fvalue) ? ', ':'').$addr_part['string']; $sa_recipients[] = $addr_part['mailto']; |