> > Hi there, I'm having problem with php code. From WF documentation I know that I have to write in the code smtp details, which I did. But now my code dosen't seems to be working.
> > I'm newbe to PHP and I'm sure there is some silly mistake in my code
> > Anybody can help me
> >
> > here is my php code
> >
Code: Select all
> >
> > <?php
> > if (isset($_POST['email'])) {
> >
> > $msg= "";
> > $msg= "Message hostalnuevasnaciones.es contact form";
> > $msg.= "\nVersión: ". strip_tags($_POST['version']);
> > $msg.= "\nNombre: ". strip_tags($_POST['nombre']);
> > $msg.= "\nEmail: ".strip_tags($_POST['email']);
> > $msg.= "\nTelefono: ".strip_tags($_POST['tfno']);
> >
> > $msg.= "\nNº personas: ". strip_tags($_POST['noper']);
> > $msg.= "\nNº habitaciones: ".strip_tags($_POST['nohab']);
> > $msg.= "\nTipo de habitación: ".strip_tags($_POST['tipohab']);
> >
> > $msg.= "\nFecha de entrada: ".strip_tags($_POST['dia-de-llegada'])."- ".strip_tags($_POST['mes-de-llegada'])."- ".strip_tags($_POST['ano-de-llegada']);
> > $msg.= "\nFecha de salida: ".strip_tags($_POST['dia-de-salida'])."- ".strip_tags($_POST['mes-de-salida'])."- ".strip_tags($_POST['ano-de-salida']);
> >
> > $msg.= "\nComentarios: \n".strip_tags($_POST['comentarios']);
> >
> > $subject = "Consulta enviada desde hostalnuevasnaciones.es por: ".$_POST['nombre'];
> >
> > mail('tomek.grzebielucha@gmail.com', $subject, $msg, "FROM:". strip_tags($_POST['nombre'])."<".strip_tags($_POST['email']).">\n");
> >
> >
> >
> >
> >
> > $smtp "smtp", array ('host' => "smtp.gmail.com",
> > 'auth' => true,
> > 'username' => "tomek.grzebielucha@gmail.com",
> > 'password' => "xxxxxxx"));
> >
> > $mail = $smtp->send($to, $headers, $body);
> > ?>
> >
> >