| | |
| | | function rcmail_get_identity($id) |
| | | { |
| | | global $USER, $OUTPUT; |
| | | |
| | | |
| | | if ($sql_arr = $USER->get_identity($id)) { |
| | | $out = $sql_arr; |
| | | $out['mailto'] = $sql_arr['email']; |
| | |
| | | |
| | | // remove any null-byte characters before parsing |
| | | $body = preg_replace('/\x00/', '', $body); |
| | | |
| | | |
| | | $searchstr = 'program/js/tiny_mce/plugins/emotions/img/'; |
| | | $offset = 0; |
| | | |
| | |
| | | |
| | | return implode(', ', $result); |
| | | } |
| | | |
| | | |
| | | /****** compose message ********/ |
| | | |
| | |
| | | |
| | | $MAIL_MIME->setHTMLBody($plugin['body']); |
| | | |
| | | // replace emoticons |
| | | $plugin['body'] = rcmail_replace_emoticons($plugin['body']); |
| | | |
| | | // add a plain text version of the e-mail as an alternative part. |
| | | $h2t = new html2text($plugin['body'], false, true, 0); |
| | | $plainTextPart = rc_wordwrap($h2t->get_text(), $LINE_LENGTH, "\r\n"); |
| | | $plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true); |
| | | if (!$plainTextPart) { |
| | | // empty message body breaks attachment handling in drafts |
| | | $plainTextPart = "\r\n"; |
| | | // empty message body breaks attachment handling in drafts |
| | | $plainTextPart = "\r\n"; |
| | | } |
| | | else { |
| | | // make sure all line endings are CRLF (#1486712) |