-/*****************************************************************/
-/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/
-/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/
-/*** + Base level indent should begin at left margin, as ***/
-/*** the require_once below looks. ***/
-/*** + All identation should consist of four space blocks ***/
-/*** + Tab characters are evil. ***/
-/*** + all comments should use "slash-star ... star-slash" ***/
-/*** style -- no pound characters, no slash-slash style ***/
-/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/
-/*** ALWAYS USE { AND } CHARACTERS!!! ***/
-/*** + Please use ' instead of ", when possible. Note " ***/
-/*** should always be used in _( ) function calls. ***/
-/*** Thank you for your help making the SM code more readable. ***/
-/*****************************************************************/
-
-require_once ('../src/validate.php');
-
- /* Print all the needed RFC822 headers */
- function write822HeaderForDraft ($fp, $t, $c, $b, $subject, $more_headers) {
- global $REMOTE_ADDR, $SERVER_NAME, $REMOTE_PORT;
- global $data_dir, $username, $popuser, $domain, $version, $useSendmail;
- global $default_charset, $HTTP_VIA, $HTTP_X_FORWARDED_FOR;
- global $REMOTE_HOST, $identity;
-
- // Storing the header to make sure the header is the same
- // everytime the header is printed.
- static $header, $headerlength;
-
- if ($header == '') {
- if (isset($identity) && ($identity != 'default')) {
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.php');
+
+/* Print all the needed RFC822 headers */
+function write822HeaderForDraft ($fp, $t, $c, $b, $subject, $more_headers, $session) {
+ global $REMOTE_ADDR, $SERVER_NAME, $REMOTE_PORT;
+ global $data_dir, $username, $popuser, $domain, $version, $useSendmail;
+ global $default_charset, $HTTP_VIA, $HTTP_X_FORWARDED_FOR;
+ global $REMOTE_HOST, $identity;
+
+ /* Storing the header to make sure the header is the same */
+ /* everytime the header is printed. */
+ static $header, $headerlength;
+
+ if ($header == '') {
+ if (isset($identity) && ($identity != 'default')) {