diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-12-13 14:42:11 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-12-13 14:42:11 +0100 |
commit | 5aed9a9a379e8324793fe107255f3467aa06ef31 (patch) | |
tree | 7e44f1bb7550be7896bfe9e4f83c709db2c8d132 /program/steps/mail/compose.inc | |
parent | 5b15700d11f7f1338039a436d5c911d297b4ac56 (diff) | |
parent | 04689fa7ee89c29b57278a354b39d9ee5397a442 (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r-- | program/steps/mail/compose.inc | 10 |
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]; } |