#1485337: fill recipient on reply to address of yourself (if there's only one address found in message)

release-0.6
alecpl 16 years ago
parent 1038a66e8a
commit 51f55bd6d2

@ -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'];

Loading…
Cancel
Save