HTML + PHP + PHPMAILER
one text
Solution:
You do the error catching wrong, do this and it will work when you are prosting to the php script with a form post. This will do nothing when you are using a javascript ajax call.
if(!$mail->Send()){
echo $mail->ErrorInfo;
$error = 'Mensagem enviada!';
return false;
} else {
return true;
}
and
if (smtp_mailer('*', '*', $Nome, $Assunto2, $Vai)) {
echo "Done"; //dont return...
}
Source