global $data_dir, $username, $domain, $key, $version, $sent_folder, $imapServerAddress, $imapPort;
$more_headers = Array();
+ // added as just a precaution (Luke: 1.0.1)
+ $t = trim($t);
+ $c = trim($c);
+ $b = trim($b);
+ $subject = trim($subject);
+ $body = trim($body);
+ $mailbox = trim($mailbox);
+ $sent_folder = trim($sent_folder);
+
$imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 1);
if ($reply_id) {
}
}
- $mailbox = trim($mailbox);
- $send_to = trim($send_to);
- $send_to_cc = trim($send_to_cc);
- $send_to_bcc = trim($send_to_bcc);
- $subject = trim($subject);
- $body = trim($body);
- $attachfile = trim($attachfile);
+ if (isset($mailbox)) $mailbox = trim($mailbox);
+ if (isset($send_to)) $send_to = trim($send_to);
+ if (isset($send_to_cc)) $send_to_cc = trim($send_to_cc);
+ if (isset($send_to_bcc)) $send_to_bcc = trim($send_to_bcc);
+ if (isset($subject)) $subject = trim($subject);
+ if (isset($body)) $body = trim($body);
+ if (isset($attachfile)) $attachfile = trim($attachfile);
if (!isset($mailbox) || $mailbox == "" || ($mailbox == "None"))
$mailbox = "INBOX";