require_once('../functions/display_messages.php');
require_once('../functions/plugin.php');
+/* --------------------- Specific Functions ------------------------------ */
+
+
+
+/**
+ * Does the opposite of sqWordWrap()
+ */
+function sqUnWordWrap(&$body) {
+ $lines = explode("\n", $body);
+ $body = '';
+ $PreviousSpaces = '';
+ for ($i = 0; $i < count($lines); $i ++) {
+ ereg("^([\t >]*)([^\t >].*)?$", $lines[$i], $regs);
+ $CurrentSpaces = $regs[1];
+ if (isset($regs[2])) {
+ $CurrentRest = $regs[2];
+ }
+
+ if ($i == 0) {
+ $PreviousSpaces = $CurrentSpaces;
+ $body = $lines[$i];
+ } else if (($PreviousSpaces == $CurrentSpaces) /* Do the beginnings match */
+ && (strlen($lines[$i - 1]) > 65) /* Over 65 characters long */
+ && strlen($CurrentRest)) { /* and there's a line to continue with */
+ $body .= ' ' . $CurrentRest;
+ } else {
+ $body .= "\n" . $lines[$i];
+ $PreviousSpaces = $CurrentSpaces;
+ }
+ }
+ $body .= "\n";
+}
+
+/* ----------------------------------------------------------------------- */
+
if (!isset($attachments)) {
$attachments = array();
session_register('attachments');
function newMail () {
global $forward_id, $imapConnection, $msg, $ent_num, $body_ary, $body,
$reply_id, $send_to, $send_to_cc, $mailbox, $send_to_bcc, $editor_size,
- $draft_id, $use_signature, $composesession;
+ $draft_id, $use_signature, $composesession, $forward_cc;
$send_to = decodeHeader($send_to, false);
$send_to_cc = decodeHeader($send_to_cc, false);
$bodyTop .= ' ' . $orig_header->to[$x] . "\n";
}
}
+ if (isset($forward_cc) && $forward_cc) {
+ $bodyTop .= _("Cc") . ': ' . $orig_header->cc[0] . "\n";
+ if (count($orig_header->cc) > 1) {
+ for ($x = 1; $x < count($orig_header->cc); $x++) {
+ $bodyTop .= ' ' . $orig_header->cc[$x] . "\n";
+ }
+ }
+ }
$bodyTop .= "\n";
$body = $bodyTop . $body;
}