| | |
| | | rcube_add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage'); |
| | | |
| | | // set page title |
| | | if (empty($_action) || $_action == 'list') |
| | | if (empty($RCMAIL->action) || $RCMAIL->action == 'list') |
| | | $OUTPUT->set_pagetitle(rcmail_localize_foldername($IMAP->get_mailbox_name())); |
| | | |
| | | |
| | |
| | | $zebra_class); |
| | | |
| | | $out .= sprintf("<td class=\"icon\">%s</td>\n", $message_icon ? sprintf($image_tag, $skin_path, $message_icon, '') : ''); |
| | | |
| | | |
| | | // format each col |
| | | foreach ($a_show_cols as $col) |
| | | { |
| | | if ($col=='from' || $col=='to') |
| | | $cont = Q(rcmail_address_string($header->$col, 3, $attrib['addicon']), 'show'); |
| | | $cont = Q(rcmail_address_string(rcube_imap::decode_mime_string($header->$col, $header->charset), 3, $attrib['addicon']), 'show'); |
| | | else if ($col=='subject') |
| | | { |
| | | $action = $mbox==$CONFIG['drafts_mbox'] ? 'compose' : 'show'; |
| | |
| | | foreach ($a_show_cols as $col) |
| | | { |
| | | if ($col=='from' || $col=='to') |
| | | $cont = Q(rcmail_address_string($header->$col, 3), 'show'); |
| | | $cont = Q(rcmail_address_string(rcube_imap::decode_mime_string($header->$col, $header->charset), 3), 'show'); |
| | | else if ($col=='subject') |
| | | { |
| | | $action = $mbox==$CONFIG['drafts_mbox'] ? 'compose' : 'show'; |
| | |
| | | function rcmail_address_string($input, $max=NULL, $addicon=NULL) |
| | | { |
| | | global $IMAP, $PRINT_MODE, $CONFIG, $OUTPUT, $EMAIL_ADDRESS_PATTERN; |
| | | |
| | | |
| | | $a_parts = $IMAP->decode_address_list($input); |
| | | |
| | | if (!sizeof($a_parts)) |
| | |
| | | { |
| | | $j++; |
| | | if ($PRINT_MODE) |
| | | $out .= sprintf('%s <%s>', Q($part['name']), $part['mailto']); |
| | | $out .= sprintf('%s <%s>', Q(rcube_charset_convert($part['name'])), $part['mailto']); |
| | | else if (preg_match($EMAIL_ADDRESS_PATTERN, $part['mailto'])) |
| | | { |
| | | $out .= sprintf('<a href="mailto:%s" onclick="return %s.command(\'compose\',\'%s\',this)" class="rcmContactAddress" title="%s">%s</a>', |
| | |
| | | // clean Bcc from header for recipients |
| | | $send_headers = $headers; |
| | | unset($send_headers['Bcc']); |
| | | // here too, it because txtHeaders() below use $message->_headers not only $send_headers |
| | | unset($message->_headers['Bcc']); |
| | | |
| | | // send message |
| | | $smtp_response = array(); |
| | | $sent = smtp_mail($from, $a_recipients, ($foo = $message->txtHeaders($send_headers)), $msg_body, $smtp_response); |
| | | $sent = smtp_mail($from, $a_recipients, ($foo = $message->txtHeaders($send_headers, true)), $msg_body, $smtp_response); |
| | | |
| | | // log error |
| | | if (!$sent) |