write
Whether you are interested in working with us or just want to ask a question, we would love to hear from you.Go ahead and drop us an email below.
grant@springloaded.biz
require("includes/class.phpmailer.php"); function sendEmail($emailToAddress,$emailSubject,$emailContent,$emailFromAddress, $emailAttachments=false, $emailFromName=false, $isHTMLmail=false, $hostName=false) { if (!$emailFromName) { $emailFromName = $emailFromAddress; } $mail = new PHPMailer(); $mail->From = $emailFromAddress; // email address of the sender $mail->FromName = $emailFromName; // name of the sendre $mail->AddReplyTo($emailFromAddress); // reply to of the sender $mail->Sender = $emailFromAddress; // Return-Path to of the sender $mail->AddAddress($emailToAddress); // email address of the recipient if ($hostName) { $mail->Hostname = $hostName; // this } if ($emailAttachments) { foreach ($emailAttachments as $attachment) { $mail->AddAttachment($attachment); // add attachments } } if (!$isHTMLmail===true) { $isHTMLmail=false; } // if $isHTMLmail is not explicitly true - set to false $mail->IsHTML($isHTMLmail); // set email format to HTML $mail->Subject = $emailSubject; // email subject $mail->Body = $emailContent; // email content //$mail->AltBody = strip_tags($emailContent); // this needs some refinement before it can be used if ($mail->Send()) { return true; } else { return false; } } $action = $_POST["action"]; if ($action=="submitted") { $name = $_POST["name"]; $email = $_POST["email"]; $website = $_POST["website"]; $company = $_POST["company"]; $projectType = $_POST["projectType"]; $timeline = $_POST["timeline"]; $message = $_POST["message"]; $emailContent = "From : ".$name."\n"; $emailContent .="Email : ".$email."\n"; $emailContent .="Website : ".$website."\n"; $emailContent .="Company : ".$company."\n"; $emailContent .="Project Type : ".$projectType."\n"; $emailContent .="Timeline : ".$timeline."\n"; $emailContent .="Message : ".$message."\n"; sendEmail("grant@springloaded.co.za","Springloaded Contact",$emailContent,"no-reply@springloaded.co.za"); } ?>

