Hey,
I am working on a trouble ticket program but I want the user to be able to mail in his ticket if he feels like doing it that way. I started working on a mail program seperately just to try and figure it all out. I am getting all sorts of warnings that I am unfamiliar with so I thought I would try to seek some assistance here.
I made a general HTML login form:
<html>
<body>
<form action="mail.php" method="POST">
Username:<br>
<input type="text" name="username"><br>
Password:<br>
<input type="password" name="password"><br>
Server:<br>
<input type="text" name="server"><br>
<input type="submit" value="Check Mail!">
</form>
</body>
</html>
Then another piece to get the mail for that account and echo it out in an extremely basic way (i know... its just for the trial)
<?php
$link = imap_open($server, $username, $password);
$headers = imap_headers($link);
$count = count($headers);
if($count == 0) {
echo "<b> You have no mail! </b>";
} else {
for($x = 1; $x < $count; $x ++) {
$idx=($x-1);
$num = $x;
$header = imap_header($link,$num);
$from = $header[fromaddress];
$subject = $header[Subject];
$body = imap_body($link,$num);
echo "From: $from<br>";
echo "Subject: $subject<br>";
echo "Body:<br>";
echo "$body";
}
}
?>
Thank you very much for any assistance you give, I am new to this email handling thing, any and all assistance will be GREATLY appreciated!
Thanks,
Brian