This seems to be what im looking for after I added the headers to allow html but not sure where to add this with my current code.
PHP Code:
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';
Amended code looks like this:
PHP Code:
<?php
$to = 'brordinbdf@gmail.com' ;
$from = $_REQUEST['email'] ;
$name = $_REQUEST['CharacterName'] ;
$headers = "From: $from";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$subject = "New Insanity Guild Application";
$fields = array();
$fields{"CharacterName"} = "<br />Character Name<br />";
$fields{"ArmoryLink"} = "Battle.net link";
$fields{"CharacterClass"} = "Character Class";
$fields{"CurrentSpec"} = "Current Spec";
$fields{"CurrentServer"} = "Current Server";
$fields{"CurrentGuild"} = "Current Guild Name";
$fields{"ReasonForLeaving"} = "Reason for leaving current guild";
$fields{"GuildHistory"} = "List guild history";
$fields{"Reason"} = "Reason for applying to Insanity";
$fields{"LookGuild"} = "What you look for in a guild";
$fields{"WwsReportLinks"} = "List WWS/WOL report links";
$fields{"AddNotes"} = "Additional Notes";
$body = "We have received the following application:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$headers2 = "From: noreply@insanity-guild.net";
$subject2 = "Thank you for applying to Insanity of Black Dragonflight";
$autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www.insanity-guild.net";
if($from == '') {print "You have not entered an email, please go back and try again";}
else {
if($name == '') {print "You have not entered a name, please go back and try again";}
else {
$send = mail($to, $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
if($send)
{header( "Location: http://www.insanity-guild.net/thankyou.html" );}
else
{print "We encountered an error sending your mail, please notify brordinbdf@gmail.com"; }
}
}
?>
Bookmarks