ok now that works but now I loose my formatting for the e-mails I just got rid of the pre tags now it looks like
################## LogWatch 3.3 Begin ##################### ---------------- Connections (secure-log) Begin ------------------- New Users: abuse(1015) mail-abuse(1016) help(1017) Connections: Service imapd: 1000@127.0.0.1: 42 Time(s) Service in.telnetd: : 3 Time(s) 0@192.168.1.106: 1 Time(s) Service popa3d: : 15 Time(s) Service in.comsat: : 15 Time(s) Unmatched Entries su[12108]: + pts/0 john-root su[17001]: + pts/0 john-root ----------------- Connections (secure-log) End -------------------- --------------------- sendmail Begin ------------------------ 4320 bytes transferred 16 messages sent Unmatched Entries gethostbyaddr(192.168.1.101) failed: 1: 1 Time(s) ---------------------- sendmail End ------------------------- ------------------ Fortune -------------------- The very powerful and the very stupid have one thing in common. Instead of altering their views to fit the facts, they alter the facts to fit their views ... which can be very uncomfortable if you happen to be one of the facts that needs altering. -- Doctor Who, "Face of Evil" ###################### LogWatch End #########################
when I get an e-mail. if I add the <pre> back in then it formats it but I loose my sized table. Any ideas?
John
code for the whole script
<table width="1000" border ="2">
<tr>
<td width="100%">
<table width="100%" border="1" nowrap>
<tr>
<td width="700">
<?
// if multipart, display text sections
if(is_array($sections))
{
for($x=0; $x<sizeof($sections); $x++)
{
if(($sections[$x]["type"] == "text/plain" || $sections[$x]["type"] ==
"message/rfc822") && $sections[$x]["disposition"] != "attachment")
{
echo htmlspecialchars(stripslashes(trim(imap_fetchbody($inbox, $id,
$sections[$x]["pid"]))));
echo "<br>";
}
}
}
else
{
echo htmlspecialchars(stripslashes(trim(imap_body($inbox, $id))));
}
// if attachments exist
if (is_array($attachments))
{
?>
<tr>
<td valign=top><font face="Verdana" size="-1"><b>Attachments:
</b></font></td>
<td valign=top><font face="Verdana" size="-1"><ul>
<?
// display as list
for($x=0; $x<sizeof($attachments); $x++)
{
echo "<li><a href=download.php?id=$id&pid=" . $attachments[$x]["pid"] .
">" . $attachments[$x]["name"] . " (" . ceil($attachments[$x]["size"]/1024)
. " KB)</a>";
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?
}
?>
</table>