$intSection = 3;
require "../classes/class.phpmailer.php";
// Parámetros Post
if (isset($_POST["txt_nombre"])){
$txt_nombre = utf8_decode($_POST["txt_nombre"]);
$txt_email = $_POST["txt_email"];
$txt_comentario = utf8_decode($_POST["txt_comentario"]);
}
// Envío de los e-mails
if (isset($_POST["txt_nombre"])){
$body = "Nom: ".$txt_nombre."
";
$body .= "E-mail: ".$txt_email."
";
$body .= "Comentari: ".$txt_comentario."";
try {
$mail = new PHPMailer(true); //New instance, with exceptions enabled
$mail->IsSMTP(); // tell the class to use SMTP
//$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Port = 25; // set the SMTP server port
$mail->Host = "localhost"; // SMTP server
$mail->Username = "info@gotoandweb.com"; // SMTP server username
$mail->Password = "inf98776"; // SMTP server password
$mail->AddReplyTo($txt_email,$txt_nombre);
$mail->From = "info@gotoandweb.com";
$mail->FromName = "GotoAndWeb";
$to = "sergi@gotoandweb.com";
$to2 = "fran@gotoandweb.com";
$mail->AddAddress($to);
$mail->AddAddress($to2);
$mail->Subject = "Missatge Web";
$mail->WordWrap = 80; // set word wrap
$mail->MsgHTML($body);
$mail->IsHTML(true); // send as HTML
$mail->Send();
header("Location: contacte-freelances.php?send=1");
} catch (phpmailerException $e) {
header("Location: contacte-freelances.php?send=".$mail->ErrorInfo);
}
}
?>
De conformitat amb la LO 15/1999, de protecció de dades de caràcter personal li informem que les dades facilitades passaran a formar part d'un fitxer de dades gestionat per GOTOANDWEB (Sergi Puigdomènech i Francisco Cárdenas) per donar resposta a les solicituts de servei o consultes. Per acceder-hi, rectificar o cancel·lar les seves dades, pot dirigir-se per escrit a .