yo uso este:
Código PHP:
Ver originalrequire_once("includes/phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
if (!$mail->ValidateAddress($email)){
echo'<div class="alert-box">';
echo'<span>Favor digitar um email válido.</span>';
echo'<a href="index.php">fechar</a>';
echo'</div>';
}
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = 'smtp.gmail.com';
$mail->Port = 465;
$mail->SMTPSecure = 'ssl';
$mail->Username = "[email protected]"; // my email which I hope to receive the data inputed on the field $mail->Password = "mypassword";
$mail->SetFrom($email, 'Interessado'); // the email from the person who filled the form, that will be in the body of the message that I will receive
$address = "[email protected]"; // my email which I hope to receive the data inputed on the field $mail->AddAddress($address, "Fine Design");
$mail->Subject = "Fine Design - Avise me!";
$mail->MsgHTML($email);
if(!$mail->Send()) {
echo'<div class="alert-box">';
echo'<span>';
echo $mail->ErrorInfo;
echo '</span>';
echo'<a href="index.php">fechar</a>';
echo'</div>';
} else {
header("Location: index.php?status=thanks"); }
}?>