"") { // indentification incomming
$login=$post_login;
if ($_POST['post_location']=="")
$location="Location: index.php?";
else
$location="Location: $post_location?";
if ($login=="") { $error=1; $location=$location."errlogin=1&"; }
if ($_POST['post_svr']<>"")
$mailhost=$post_svr;
else { $error=1; $location=$location."errsvr=1&"; }
if ($_POST['post_password']<>"")
$password=$post_password;
else { $error=1; $location=$location."errpwd=1&"; }
if ($error==1) {
header($location);
exit();
}
$style=($post_style=="")? "classic.css" : $post_style;
session_register('style');
session_register('login');
session_register('password');
session_register('mailhost');
$mailhostport=($post_svrport=="")? 110 : $post_svrport;
session_register('mailhostport');
$mailsmtp=$post_smtp;
session_register('mailsmtp');
$mailsmtpport=($post_smtpport=="")? 25 : $post_smtpport;
session_register('mailsmtpport');
$smtpauth = ($post_auth=="auth");
session_register('smtpauth');
$spamfilter = ($post_spam=="spam");
session_register('spamfilter');
$friendfilter = ($post_friend=="friend");
session_register('friendfilter');
$ignorefilter = ($post_ignore=="ignore");
session_register('ignorefilter');
$refreshebiff=($post_refreshebiff=="")? 120 : $post_refreshebiff;
session_register('refreshebiff');
}
if ($spamfilter||$friendfilter||$ignorefilter)
include("spam.inc");
include("format.inc");
$max_mail = 100;
$max_car = 70; // Mail cols number
include("fmail.php");
$mbox = @imap_open("{".$mailhost."/pop3:".$mailhostport."}", $login,$password);
if ($mbox==FALSE) {
header("Location: index.php?errcnx=1");
exit();
}
// Retrieve number of mail
$check = imap_mailboxmsginfo($mbox);
if($check) {
$lastchange=$check->Date;
$total = $check->Nmsgs;
$recent = $check->Recent;
$unread = $check->Unread;
$deleted = $check->Deleted;
$mailboxsize = $check->Size;
}
function StringFormat($tmp) {
global $max_car;
$result="";
while (strlen($tmp)>$max_car) {
$tmp2 = substr($tmp,0,$max_car);
$result = $result.$tmp2;
// if (strpos($tmp2,"\n") === false) $result= $result."¬\n";
if (strpos($tmp2,"\n") === false) $result= $result."\n";
$tmp = substr($tmp,$max_car,strlen($tmp));
}
return $result.$tmp;
}
function displayAtt($att,$id) {
if (!(strpos($att["type"],"image")===false))
$imgsrc="img";
elseif (!(strpos($att["type"],"audio")===false))
$imgsrc="snd";
else
$imgsrc="none";
return "
".$att["name"] . " [" . $att["type"] . "] (" . ceil($att["size"]/1024) . " KB) View Download";
}
if ($action=="delete"&&isset($id)) { // Delete Message
imap_delete($mbox, $id);
imap_close($mbox, CL_EXPUNGE);
header("Location: inbox.php");
exit();
}elseif ($action=="delete") { // Delete Group of Messages
for($i=0;$i<=$nbmdel;$i++) {
if ($mail[$i]!="") imap_delete($mbox, $mail[$i]);
}
imap_close($mbox, CL_EXPUNGE);
header("Location: inbox.php");
exit();
} // end of del group of messages
?>
if (strpos($login, "@") === false) { $begin=strrpos($mailhost,"."); $server=substr($mailhost, 0, $begin); $begin=strrpos($server,"."); $maildom=substr($mailhost, $begin+1); $printlogin=$login."@".$maildom; } else { $printlogin=$login; } echo "$printlogin : $total messages ("; // when you run for the first time ewiff, there no new message if (!isset($oldtotal)) $oldtotal=0; if (!isset($oldnewmsg)) $oldnewmsg=0; $newmsg = $total-$oldtotal; // when deleting email, there no new message, and old message decreasse if ($newmsg<0) { $newmsg =0; $oldtotal=$total; } if ($newmsg>0) { if ($newmsg>1) echo "$newmsg new messages"; else echo "$newmsg new message"; } else echo "No new message"; echo " - "; $oldmsg = $total-$newmsg; if ($oldmsg>0) { if ($oldmsg>1) echo "$oldmsg old messages"; else echo "$oldmsg old message"; } else echo "No old message"; $oldtotal=$total; session_register('oldtotal'); session_register('total'); $oldnewmsg=$newmsg; session_register('oldnewmsg'); echo ")"; ?> |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
|||
?> |
![]() |
=$mailfrom?>
$tmp=htmlspecialchars($mailfromaddr); if ($tmp!="") echo "![]() |
href="inbox.php?id==$mailid?>">=$mailsubject?> | =$maildate?> | =$mailsize?> Kb | "; else echo " "?> |
Check "; echo " "; echo "Delete "; echo "Select All "; echo "Select None "; echo " "; echo "Write "; echo " "; echo "Options "; echo "Logout "; echo " "; echo " | Login | $login |
Pop Server | $mailhost:$mailhostport | |
Smtp Server | "; echo "$mailsmtp:$mailsmtpport | |
Smtp Auth | ".($smtpauth ? "Enable" : "Disable")." |
This email don't exist ! |
![]() |
Back "; if ($id>1) echo "<< "; echo ">> "; echo "Delete "; echo " "; echo "Standard "; echo "Text as HTML "; echo "Full Text "; echo " "; echo "Send "; echo "Reply "; echo "Download "; echo " "; echo "Options "; echo "Logout "; ?> |
From: | $classvalue=($ignorefilter ? (checkFromIgnore($mailfrom." ".$mailfromaddr,false)? "spamsubject" : "all") : "all"); $classvalue=($friendfilter ? (checkFromFriend($mailfrom." ".$mailfromaddr,false)? "all" : $classvalue) : $classvalue); ?> valign="top">=$mailfrom?>
$tmp=htmlspecialchars($mailfromaddr); if ($tmp!="") echo "![]() |
|
Date: | =$maildate?> | |
To: | =$mailto?>
$tmp=htmlspecialchars($mailtoaddr); if ($tmp!="") echo "![]() |
|
Copy to: | =$mailcc?> | |
Subject: | valign="top">=$mailsubject?> | |
".(($isspam=="spam")? " WARNING : This content was assimilited as SPAM " : "")."$mailprintcontentFound : \"$spamresult\" | ";
?>
||
Attachments: |
// display as list
for($x=0; $x |
Back "; if ($id>1) echo "<< "; echo ">> "; echo "Delete "; echo " "; echo "Standard "; echo "Text as HTML "; echo "Full Text "; if (isset($htmlblock)) { echo " "; echo "HTML as Text "; echo "View HTML "; } echo " "; echo "Send "; echo "Reply "; echo "Download "; echo " "; echo "Options "; echo "Logout "; ?> |