<?php
// FORM TO EMAIL
// http://www.webformdesigner.com
// The following variables can be changed to suit
// Change this to the email address where the message is to be sent
$your_email = "brian@goafi.com";
// $your_email = "tim@r3ddstudios.com"; // For testing purposes
// This is the return URL after the form has been processed
$thankyou = "../thankyou.html";
// This is what is displayed in the email subject line
// Change it if you want
$subject = "Quick Application";
// You shouldn't need to edit below this line
// ---------------------------------------------
$name = "Accredited Financial Online Appraisal Form";
$email = "noreply@accreditedfinancial.com";
$year = date("Y");
$month = date("m");
$day = date("d");
$hour = date("h");
$min = date("i");
$tod = date("a");
// Timestamp this message
$TimeOfMessage = date('d')."/".date('m')."/".date('y')."(".date('D').") @ ".date('H:i');
// finally, send e-mail
$ip=$_SERVER["REMOTE_ADDR"];
$message .= "Please open the CSV file to see your content\n";
// send the complete set of variables as well
// send the email
require("class.phpmailer.php");
// create new instance of PHPMailer class
$mail = new PHPMailer();
// Set up the email variables
$mail->From = $email;
$mail->FromName = $name;
$mail->AddAddress($your_email);
$mail->IsHTML(false);
$mail->Subject = $subject;
$mail->Body = $message;
$mail->AddStringAttachment(implode(',', $_POST), 'Formdata.csv');
$mail->Send();
// go to return URL
if (isset($thankyou)) {
header("Location: $thankyou");
exit();
}
?>