summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/compose.inc7
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'];