'; $ebody = ''; $first = ' '; $head = ' '; $body = '

E-mail

'; $thank = '

Thank You

Thank you '; $thanks = ' for takeing the time to send me an e-mail. This page just confirms that it has been sent. I will reply as soon as I can.'; $error = '

Error!

I am sorry but something went wrong when mailing this message. Please go to the Feed Back page and try another way of sending your message. And tell me about this problem, no one should ever see this page. It is only for when things go real wrong on my end.'; $donate = '

Donate

If you are just writing to say thank you, why not Donate instead?'; $form = '

Contact Me

If you want to send and e-mail to me you have come to the right place. Please make sure you type your e-mail address correct, otherwise I can\'t reply.

Please make sure you have the latest version, each new version has bug fixes so your problem my be solved.

If you want to be able to send a file (image, zip ect..) you need JavaScript enabled.

'; $fileError = '

The file you attempted to upload is too big, please chose a smaller file.

'; $formError = '

There were some errors in processing the e-mail please correct them.

'; $form1 = '
Email From:
'; if($id=="success"){ echo ($first.'E-mail - Sent'.$head); echo ($body.$thank.$_GET['name'].$thanks.$ediv); include("content/menu.php"); echo ($ebody); } if($id=="error") { echo ($first.'E-mail - Error'.$head.$body.$error.$donate.$ediv); include("content/menu.php"); echo ($ebody); } if($id=="") { echo ($first.'E-mail'.$head.$body.$form.$form1.$form2.$form3.$form4.$form5.$form6.$form7.$form8.$form9.$donate.$ediv); include("content/menu.php"); echo ($ebody); } $uri = 'http://'; $uri .= $_SERVER['HTTP_HOST']; if($id=="send") { $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "michael.buckley@ozemail.com.au"; $Subject = Trim(stripslashes($_POST['Subject'])); $Name = Trim(stripslashes($_POST['Name'])); $Comments = Trim(stripslashes($_POST['Comments'])); $Radio = Trim(stripslashes($_POST['Radio'])); $letter = $_FILES['userfile']['name']; $fType = $_FILES['userfile']['type']; $fSize = $_FILES['userfile']['size']; $f_name = $_FILES['userfile']['tmp_name']; if($fSize < 150000) { echo ($first.'E-mail'.$head.$body.$form.$fileError.$form1.$form2.$EmailFrom.$form3.$form4.$Subject.$form5.$form6.$Name.$form7.$form8.$Comments.$form9.$donate.$ediv); include("content/menu.php"); echo ($ebody); exit; } $validationOK="true"; if (Trim($EmailFrom)==""){$from="false"; $validationOK='false';} if (Trim($Subject)=="") {$subject="false"; $validationOK='false';} if (Trim($Name)=="") {$name="false"; $validationOK='false';} if (Trim($Comments)=="") {$com="false"; $validationOK='false';} $handle=fopen($f_name, 'rb'); $f_contents=fread($handle, filesize($f_name)); $f_contents=chunk_split(base64_encode($f_contents)); $f_type=filetype($f_name); fclose($handle); if ($validationOK == 'false') { if($from == "false") $class1 = ' wrong="true" '; if($subject == "false") $class2 = ' wrong="true" '; if($name == "false") $class3 = ' wrong="true" '; if($com == "false") $class4 = ' wrong="true" '; echo ($first.'E-mail'.$head.$body.$form.$formError.$form1.$class1.$form2.$EmailFrom.$form3.$class2.$form4.$Subject.$form5.$class3.$form6.$Name.$form7.$class4.$form8.$Comments.$form9.$donate.$ediv); include("content/menu.php"); echo ($ebody); exit; } $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Comments: "; $Body .= $Comments; $headers .= "From: <". $EmailFrom .">\n".$eol; $headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">\n".$eol; $headers .= "X-Mailer: PHP v".phpversion()."\n".$eol; $mime_boundary=md5(time()); $headers .= 'MIME-Version: 1.0'."\n".$eol; $headers .= "Content-Type: multipart/mixed; boundary=\"".$mime_boundary."\""."\n".$eol; $msg = ""; $msg .= "This is a multi-part message in MIME format.\n".$eol; $msg .= "--".$mime_boundary."\n".$eol; $msg .= "Content-Type: text/plain; charset=iso-8859-1;"."\n".$eol; $msg .= "Content-Transfer-Encoding: 7bit"."\n".$eol; $msg .= "Content-Disposition: inline;"."\n"."\n".$eol; $msg .= $Body."\n".$eol.$eol; $msg .= "--".$mime_boundary."\n".$eol; $msg .= "Content-Type: ".$fType."; name=\"".$letter."\""."\n".$eol; $msg .= "Content-Transfer-Encoding: base64"."\n".$eol; $msg .= "Content-Disposition: inline; filename=\"".$letter."\""."\n"."\n".$eol.$eol; $msg .= $f_contents."\n".$eol.$eol; # Setup for text OR html $msg .= "Content-Type: multipart/alternative"."\n".$eol; $msg .= "--".$mime_boundary."--"."\n".$eol.$eol; $success = mail($EmailTo, $Subject, $msg, $headers); if ($success){header('Location: '.$uri.'/email.html?id=success');} else{header('Location: '.$uri.'/email.html?id=error');} } ?>