summaryrefslogtreecommitdiff
path: root/program/steps/mail/compose.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-12-13 14:42:11 +0100
committerAleksander Machniak <alec@alec.pl>2012-12-13 14:42:11 +0100
commit5aed9a9a379e8324793fe107255f3467aa06ef31 (patch)
tree7e44f1bb7550be7896bfe9e4f83c709db2c8d132 /program/steps/mail/compose.inc
parent5b15700d11f7f1338039a436d5c911d297b4ac56 (diff)
parent04689fa7ee89c29b57278a354b39d9ee5397a442 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r--program/steps/mail/compose.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index d181a72e6..d764f5289 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -455,6 +455,16 @@ function rcmail_identity_select($MESSAGE, $identities, $compose_mode)
}
}
+ // Fallback using Envelope-To
+ if ($from_idx === null && ($envelope_to = $MESSAGE->headers->others['envelope-to'])) {
+ foreach ($identities as $idx => $ident) {
+ if (in_array($ident['email_ascii'], (array)$envelope_to)) {
+ $from_idx = $idx;
+ break;
+ }
+ }
+ }
+
return $identities[$from_idx !== null ? $from_idx : $default_identity];
}