I have tried a basic "test" using:
Code: Select all
// Include this needed file
require_once 'lib/swift_required.php';
// Start the mailer
$mailer = new Swift_Mailer(new Swift_MailTransport());
// Create a message
// SYNTAX is $message = Swift_Message::newInstance('SUBJECT', 'MESSAGE', 'text/html')
// ->setFrom(array('from@email.address' => 'Graham Gillett'))
// ->setTo(array('to@email.address' => 'Test Person'));
$message = Swift_Message::newInstance('Enquiry from website', 'MESSAGE', 'text/html')
->setFrom(array('info@voxnational.co.za' => 'Graham'))
->setTo(array('$email_address' => $first_name));
// Send it
$mailer->send($message);
Code: Select all
// get variables
$company = $_POST["Company"];
$last_name = $_POST["Last_Name"];
$first_name = $_POST["First_Name"];
$email_address = $_POST["email"];
$telephone_number = $_POST["Contact_Telephone"];
$cellphone_number = $_POST["Contact_Cellphone"];