<?php
$subject = "Your Test Email";
$message = " $todayis [EST] \n
Inquiry by: $visitor \n
Their email: $visitormail \n
Phone: $myphone \n
Sender IP address: $MyIP \n
Message: $notes \n
";
$message = $message."This is a test message. \n";
include("Mail.php");
/* mail setup recipients, subject etc */
$To=(string)$SendToEmail ;
$bcc = "WEBMASTERS_EMAIL_ADDRESS";
$recipients = $To.",".$bcc;
$headers["From"] = "youremailaddress";
$headers["To"] = $To;
$headers["Reply-To"] = $visitormail;
$headers["Subject"] = $subject;
$mailmsg = $message;
/* SMTP server name, port, user/passwd */
$smtpinfo["host"] = "smtpservername";
$smtpinfo["port"] = "25";
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "Emailaddress";
$smtpinfo["password"] = "emailpassword";
/* Create the mail object using the Mail::factory method */
$mail_object =& Mail::factory("smtp", $smtpinfo);
/* Ok send mail */
$mail_object->send($recipients, $headers, $mailmsg);
?>