Changeset 2599 in subversion
- Timestamp:
- Jun 3, 2009 4:33:28 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/steps/mail/sendmail.inc
r2491 r2599 150 150 151 151 // parse email address input 152 function rcmail_ mailto_format($mailto)152 function rcmail_email_input_format($mailto) 153 153 { 154 154 $regexp = array('/[,;]\s*[\r\n]+/', '/[\r\n]+/', '/[,;]\s*$/m', '/;/', '/(\S{1})(<\S+@\S+>)/U'); … … 201 201 $message_charset = isset($_POST['_charset']) ? $_POST['_charset'] : $input_charset; 202 202 203 $mailto = rcmail_ mailto_format(get_input_value('_to', RCUBE_INPUT_POST, TRUE, $message_charset));204 $mailcc = rcmail_ mailto_format(get_input_value('_cc', RCUBE_INPUT_POST, TRUE, $message_charset));205 $mailbcc = rcmail_ mailto_format(get_input_value('_bcc', RCUBE_INPUT_POST, TRUE, $message_charset));203 $mailto = rcmail_email_input_format(get_input_value('_to', RCUBE_INPUT_POST, TRUE, $message_charset)); 204 $mailcc = rcmail_email_input_format(get_input_value('_cc', RCUBE_INPUT_POST, TRUE, $message_charset)); 205 $mailbcc = rcmail_email_input_format(get_input_value('_bcc', RCUBE_INPUT_POST, TRUE, $message_charset)); 206 206 207 207 if (empty($mailto) && !empty($mailcc)) { … … 216 216 $identity_arr = rcmail_get_identity($from); 217 217 218 if ($identity_arr) 218 if (!$identity_arr && ($from = rcmail_email_input_format($from))) { 219 if (preg_match('/(<\S+@\S+)/', $from, $m)) 220 $identity_arr['mailto'] = $m[1]; 221 } else 219 222 $from = $identity_arr['mailto']; 220 223 … … 264 267 265 268 if (!empty($_POST['_replyto'])) 266 $headers['Reply-To'] = rcmail_ mailto_format(get_input_value('_replyto', RCUBE_INPUT_POST, TRUE, $message_charset));269 $headers['Reply-To'] = rcmail_email_input_format(get_input_value('_replyto', RCUBE_INPUT_POST, TRUE, $message_charset)); 267 270 else if (!empty($identity_arr['reply-to'])) 268 271 $headers['Reply-To'] = $identity_arr['reply-to'];
Note: See TracChangeset
for help on using the changeset viewer.
