the above exception.
$transport = Swift_SmtpTransport::newInstance('smtp.zoho.com', 465, 'ssl' )
->setPassword('xxxxxxxxxxxxxxxxxxxx')
;
$mailer = Swift_Mailer::newInstance($transport);
// Creating the message text using fields sent through POST
foreach ($_POST as $key => $value)
$messageText .= ucfirst($key).": ".$value."\n\n";
// You can change "A message from Pivot Template Form" to your own subject if you want.
$message = Swift_Message::newInstance('A message from Pivot Template Form')
->setFrom(array($_POST['email'] => $_POST['name']))
// ^ ^
// Your email address_/ Your name_/
// Send the message or catch an error if it occurs.
try{
echo($mailer->send($message));
}
catch(Exception $e){
echo($e->getMessage());
}
exit;
}