Sí, PHPMailer es una muy buena opción.
Por ejemplo, si lo desea, puede usar el servidor SMTP gratuito de Google (es como enviar desde su cuenta de Gmail), o puede omitir la parte SMTP y enviarla como una llamada típica de correo(), pero con todos los encabezados correctos, etc. Ofrece correos electrónicos de varias partes, archivos adjuntos.
Bastante fácil de instalar también.
<?php
$mail = new PHPMailer(true);
//Send mail using gmail
if($send_using_gmail){
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = "[email protected]"; // GMAIL username
$mail->Password = "your-gmail-password"; // GMAIL password
}
//Typical mail data
$mail->AddAddress($email, $name);
$mail->SetFrom($email_from, $name_from);
$mail->Subject = "My Subject";
$mail->Body = "Mail contents";
try{
$mail->Send();
echo "Success!";
} catch(Exception $e){
//Something went bad
echo "Fail - " . $mail->ErrorInfo;
}
?>
estoy usando algo como eso atm – dynamic
Entonces ... ¿esto usa SMTP y SSL? –
@Sortofabeginner solo mira el código :) –