--- nocc-dev/send.php Wed Apr 25 03:10:39 2001 +++ nocc-0.9.4-inter/send.php Thu May 24 09:51:13 2001 @@ -39,7 +39,7 @@ if (is_uploaded_file($mail_att)) { copy($mail_att, $tmpdir."/".$tmp_name); - $attach_array[$num_attach]->file_name = $mail_att_name; + $attach_array[$num_attach]->file_name = basename($mail_att_name); $attach_array[$num_attach]->tmp_file = $tmp_name; $attach_array[$num_attach]->file_size = $mail_att_size; $attach_array[$num_attach]->file_mime = $mail_att_type; @@ -130,4 +130,4 @@ } require ("html/footer.php"); } -?> \ No newline at end of file +?> --- nocc-dev/functions.php Thu May 10 22:22:01 2001 +++ nocc-0.9.4-inter/functions.php Thu May 24 09:51:13 2001 @@ -13,12 +13,12 @@ /* ----------------------------------------------------- */ -function inbox($servr, $user, $passwd, $folder, $sort, $sortdir, $lang, $theme) +function inbox($servr, $user,$domain, $passwd, $folder, $sort, $sortdir, $lang, $theme) { $mailhost = $servr; require("conf.php"); - $pop = @imap_open("{".$mailhost."}".$folder, $user, $passwd); + $pop = @imap_open("{".$mailhost."}".$folder, "$user@$domain", $passwd); if ($pop == false) return (-1); else @@ -104,7 +104,7 @@ /* ----------------------------------------------------- */ -function aff_mail($servr, $user, $passwd, $folder, $mail, $verbose, $lang, $sort, $sortdir) +function aff_mail($servr, $user, $domain,$passwd, $folder, $mail, $verbose, $lang, $sort, $sortdir) { $mailhost = $servr; require ("conf.php"); @@ -117,7 +117,7 @@ if (setlocale (LC_TIME, $lang_locale) != $lang_locale) $default_date_format = $no_locale_date_format; $current_date = strftime($default_date_format, time()); - $pop = @imap_open("{".$mailhost."}".$folder, $user, $passwd); + $pop = @imap_open("{".$mailhost."}".$folder, "$user@$domain", $passwd); // Finding the next and previous message number $sorted = imap_sort($pop, $sort, $sortdir); for ($i = 0; $i < sizeof($sorted); $i++) @@ -211,13 +211,14 @@ $att_name = $this_part->description; for ($lcv = 0; $lcv < count($this_part->parameters); $lcv++) { - $param = $this_part->parameters[$lcv]; - if ($param->attribute == "NAME") + $param = $this_part->parameters[$lcv]; + if (($param->attribute == "NAME") || ($param->attribute="name")) { $att_name = $param->value; break; } } + switch ($this_part->type) { case TYPETEXT: @@ -500,13 +501,13 @@ // Function that save the attachment locally for reply, transfer... // This function returns an array of all the attachment -function save_attachment($servr, $user, $passwd, $folder, $mail, $tmpdir) +function save_attachment($servr, $user, $domain, $passwd, $folder, $mail, $tmpdir) { GLOBAL $attach_tab; $i = 0; $attach_array = array(); - $pop = imap_open("{".$servr."}".$folder, $user, $passwd); + $pop = imap_open("{".$servr."}".$folder, "$user@$domain", $passwd); while ($tmp = array_shift($attach_tab)) { $i++; @@ -530,9 +531,9 @@ /* ----------------------------------------------------- */ -function view_part($servr, $user, $passwd, $folder, $mail, $part_no, $transfer, $msg_charset, $charset) +function view_part($servr, $user, $domain, $passwd, $folder, $mail, $part_no, $transfer, $msg_charset, $charset) { - $pop = imap_open("{".$servr."}".$folder, $user, $passwd); + $pop = imap_open("{".$servr."}".$folder, "$user@$domain", $passwd); $text = imap_fetchbody($pop, $mail, $part_no); if ($transfer == "BASE64") $str = nl2br(imap_base64($text)); @@ -575,4 +576,4 @@ } /* ----------------------------------------------------- */ -?> \ No newline at end of file +?> --- nocc-dev/get_img.php Fri Feb 23 17:31:57 2001 +++ nocc-0.9.4-inter/get_img.php Thu May 24 09:51:13 2001 @@ -12,7 +12,7 @@ session_register ("user", "passwd"); require ("conf.php"); -$pop = imap_open("{".$servr."}INBOX", $user, stripslashes($passwd)); +$pop = imap_open("{".$servr."}INBOX", "$user@$domain", stripslashes($passwd)); $img = imap_fetchbody($pop, $mail, $num); imap_close($pop); if ($transfer == "BASE64") @@ -22,4 +22,4 @@ header("Content-type: image/".$mime); echo $img; -?> \ No newline at end of file +?> --- nocc-dev/delete.php Thu Mar 29 16:37:13 2001 +++ nocc-0.9.4-inter/delete.php Thu May 24 09:51:13 2001 @@ -14,7 +14,7 @@ session_register ("user", "passwd"); require ("conf.php"); -$pop = imap_open("{".$servr."}INBOX", $user, stripslashes($passwd)); +$pop = imap_open("{".$servr."}INBOX", "$user@$domain", stripslashes($passwd)); $num_messages = imap_num_msg($pop); if (isset($only_one) && ($only_one == 1)) @@ -30,4 +30,4 @@ imap_close($pop, CL_EXPUNGE); Header ("Location: action.php?sort=$sort&sortdir=$sortdir&lang=$lang"); -?> \ No newline at end of file +?> --- nocc-dev/action.php Fri Apr 20 03:32:06 2001 +++ nocc-0.9.4-inter/action.php Thu May 24 09:51:12 2001 @@ -27,14 +27,14 @@ // Here we display the message require ("html/menu_mail.php"); require ("html/html_mail_top.php"); - $content = aff_mail($servr, $user, stripslashes($passwd), $folder, $mail, $verbose, $lang, $sort, $sortdir); + $content = aff_mail($servr, $user, $domain, stripslashes($passwd), $folder, $mail, $verbose, $lang, $sort, $sortdir); require ("html/html_mail_header.php"); while ($tmp = array_shift($attach_tab)) { // $attach_tab is the array of attachments // If it's a text/plain, display it if ($display_text_attach && eregi ("text/plain", $tmp["mime"])) - echo "
".view_part($servr, $user, stripslashes($passwd), $folder, $mail, $tmp["number"], $tmp["transfer"], $tmp["charset"], $charset); + echo "
".view_part($servr, $user, $domain, stripslashes($passwd), $folder, $mail, $tmp["number"], $tmp["transfer"], $tmp["charset"], $charset); if ($display_img_attach && (eregi ("image", $tmp["mime"]) && ($tmp["id"] == ""))) { // if it's an image, display it @@ -58,7 +58,7 @@ require ("html/menu_inbox.php"); break; case "reply": - $content = aff_mail($servr, $user, stripslashes($passwd), $folder, $mail, $verbose, $lang, $sort, $sortdir); + $content = aff_mail($servr, $user, $domain, stripslashes($passwd), $folder, $mail, $verbose, $lang, $sort, $sortdir); $mail_to = $content["from"]; // Test for Re: in subject, should not be added twice ! if (!strcasecmp(substr($content["subject"], 0, 2), $html_reply_short)) @@ -67,7 +67,7 @@ $mail_subject = $html_reply_short.": ".$content["subject"]; $mail_body = $original_msg."\n".$html_from.": ".$content["from"]."\n".$html_to.": ".$content["to"]."\n".$html_sent.": ".$content["date"]."\n".$html_subject.": ".$content["subject"]."\n\n".strip_tags($content["body"], ""); // We add the attachments of the original message - list($num_attach, $attach_array) = save_attachment($servr, $user, stripslashes($passwd), $folder, $mail, $tmpdir); + list($num_attach, $attach_array) = save_attachment($servr, $user, $domain, stripslashes($passwd), $folder, $mail, $tmpdir); // Registering the attachments array into the session session_register("num_attach", "attach_array"); require ("html/menu_inbox.php"); @@ -75,7 +75,7 @@ require ("html/menu_inbox.php"); break; case "reply_all": - $content = aff_mail($servr, $user, stripslashes($passwd), $folder, $mail, $verbose, $lang, $sort, $sortdir); + $content = aff_mail($servr, $user, $domain, stripslashes($passwd), $folder, $mail, $verbose, $lang, $sort, $sortdir); $mail_to = get_reply_all($user, $domain, $content["from"], $content["to"], $content["cc"]); if (!strcasecmp(substr($content["subject"], 0, 2), $html_reply_short)) $mail_subject = $content["subject"]; @@ -83,7 +83,7 @@ $mail_subject = $html_reply_short.": ".$content["subject"]; $mail_body = $original_msg."\n".$html_from.": ".$content["from"]."\n".$html_to.": ".$content["to"]."\n".$html_sent.": ".$content["date"]."\n".$html_subject.": ".$content["subject"]."\n\n".strip_tags($content["body"], ""); // We add the attachments of the original message - list($num_attach, $attach_array) = save_attachment($servr, $user, stripslashes($passwd), $folder, $mail, $tmpdir); + list($num_attach, $attach_array) = save_attachment($servr, $user, $domain, stripslashes($passwd), $folder, $mail, $tmpdir); // Registering the attachments array into the session session_register("num_attach", "attach_array"); require ("html/menu_inbox.php"); @@ -91,11 +91,11 @@ require ("html/menu_inbox.php"); break; case "forward": - $content = aff_mail($servr, $user, stripslashes($passwd), $folder, $mail, $verbose, $lang, $sort, $sortdir); + $content = aff_mail($servr, $user, $domain,stripslashes($passwd), $folder, $mail, $verbose, $lang, $sort, $sortdir); $mail_subject = $html_forward_short.": ".$content["subject"]; $mail_body = $original_msg."\n".$html_from.": ".$content["from"]."\n".$html_to.": ".$content["to"]."\n".$html_sent.": ".$content["date"]."\n".$html_subject.": ".$content["subject"]."\n\n".strip_tags($content["body"], ""); // We add the attachments of the original message - list($num_attach, $attach_array) = save_attachment($servr, $user, stripslashes($passwd), $folder, $mail, $tmpdir); + list($num_attach, $attach_array) = save_attachment($servr, $user, $domain, stripslashes($passwd), $folder, $mail, $tmpdir); // Registering the attachments array into the session session_register("num_attach", "attach_array"); require ("html/menu_inbox.php"); @@ -104,7 +104,7 @@ break; default: // Default we display the mailbox - $tab_mail = inbox($servr, $user, stripslashes($passwd), $folder, $sort, $sortdir, $lang, $theme); + $tab_mail = inbox($servr, $user, $domain, stripslashes($passwd), $folder, $sort, $sortdir, $lang, $theme); switch ($tab_mail) { case -1: @@ -137,4 +137,4 @@ } require ("html/footer.php"); -?> \ No newline at end of file +?>