+/**
+ * Path for SquirrelMail required files.
+ * @ignore
+ */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/display_messages.php');
+require_once(SM_PATH . 'functions/imap.php');
+
+/* get globals */
+sqgetGlobalVar('username', $username, SQ_SESSION);
+sqgetGlobalVar('key', $key, SQ_COOKIE);
+sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
+
+sqgetGlobalVar('message', $message, SQ_FORM);
+sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
+
+sqgetGlobalVar('bypass_trash', $bypass_trash, SQ_FORM);
+
+/* end globals */
+
+if (sqGetGlobalVar('saved_draft', $tmp, SQ_GET)) {
+ $saved_draft = urlencode($tmp);
+}
+if (sqGetGlobalVar('mail_sent', $tmp, SQ_GET)) {
+ $mail_sent = urlencode($tmp);
+}
+if (sqGetGlobalVar('where', $tmp, SQ_FORM)) {
+ $where = urlencode($tmp);
+}
+if (sqGetGlobalVar('what', $tmp, SQ_FORM)) {
+ $what = urlencode($tmp);
+}
+if (sqGetGlobalVar('sort', $tmp, SQ_FORM)) {
+ $sort = (int) $tmp;
+}
+if (sqGetGlobalVar('startMessage', $tmp, SQ_FORM)) {
+ $startMessage = (int) $tmp;
+}