I cannot get this code to send the email properly.
It is not centering the email and not making the text blue, suggestion or coments.
<?PHP
// check for the array
$i=0;
$to = "";
while($i<count($address)){
//print $address[$i];
//print "; ";
$to .= "$address[$i]; ";
$i=$i+1;
}
//echo( $to ); // this is the variable that is goign to get passed to the mail command.
//echo("<br>");
//This doesn't work yet
//make sure every field is filled in:
/if( !isset($issue) || !isset($impact) || !isset($starttime) || !isset($endtime) || !isset($workaround) ||
!isset($resolution) || !isset($ticket) || !isset($contact) ){
echo( "Please fill out every field!");
//may want to redirect back to form here
}/
//start building html mail note
$message = "";
$message .= "
<html>
<head>
<title> Outage Notification</title>
</head>
<body>
<table align=center bgcolor=\"#FFFFFF\" width=\"600\" border=\"0\">
<tr>
<td><div align=center><img src=\"/images/s3-outage.jpg\" width=\"562\" height=\"188\" alt=\"\" border=\"0\"><br><br></td>
</tr>
<tr>
<td> <font color=\"Blue\">
<b><i>Issue:</i></b><br><br>
$issue<br><br>
<b><i>Impact:</i></b><br><br>
$impact<br><br>
<b><i>Start (Date/Time):</i></b><br><br>
$starttime<br><br>
<b><i>End(Date/Time):</i></b><br><br>
$endtime<br><br>
<b><i>Work Around:</i></b><br><br>
$workaround<br><br>
<b><i>Resolution:</i></b><br><br>
$resolution<br><br>
<b><i>Ticket Number:</i></b><br><br>
$ticket<br><br>
<b><i>Contact Information:</i></b><br><br>
$contact<br><br></div></font></td>
</tr>
</table>
</body>
</html>";
//may want to change this incase there is an alternate contact.
echo("Here is what you just mailed:<br>");
echo($message);
/ To send HTML mail, you can set the Content-type header. /
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/ additional headers /
$headers .= "From: S3 Communication <s3-communication@whatever.com>\r\n";
$headers .= "Bcc: \r\n";
/ and now mail it /
mail($to, $subject, $message, $headers);
?>