Website contact form problem

[email protected] ("Citlalli Chan")
Newsgroups php.webmaster
Message-ID <[email protected]>
Description:

------------

Hi, I'm having troubles with the contact form in my webpage.

I linked the php with action script.

 

Also to comunicate with the server I use the unicode: 

System.useCodepage = false;

 

Is this ok or should I errase this line?

 

Reproduce code:

---------------

<?php

 

      $destinatario="[email protected]";   

      //estos datos se usaran como cabecera del email.

      $cabeceras="MIME-Version: 1.0\r\n";

      $cabeceras .= "Content-type: text/html; charset=utf-8\r\n";

      $cabeceras.="From: {$_POST['nombre']}<{$de}>\r\n";

      $cabeceras.="Reply-To: {$_POST['email']}\r\n";

      //el asunto del mensaje:

      $asunto="Contacto Sitio Web ACCECO";

      //El cuerpo del mensaje:

      $cuerpo.=' Nombre: '.$_POST['nombre']. "<br>";

      $cuerpo.=' Email: '.$_POST['email']. "<br>";

      $cuerpo.=' Empresa: '.$_POST['empresa']. "<br>";

      $cuerpo.=' Telefono: '.$_POST['telefono']. "<br>";

      $cuerpo.=' Se entero de nosotros por: '.$_POST['medio']. "<br>";

      $cuerpo.=' Comentario: '.$_POST['texto'];

      //la persona que envia el email.

      $de=$_POST['email'];

 

 

 

      if(mail($destinatario, $asunto, $cuerpo,$cabeceras)){

            echo utf8_encode('&estado=enviado');     

       }else{

            echo utf8_encode('&estado=no_enviado');  

       } 

 

?>

 

Expected result:

----------------

It suppouse to send an email with the data previously captured in the form.

The code uses an "if" to make sure the process is complete, when it's not a
messagge tells you that a problem ocurred.

 

Actual result:

--------------

An error ocurred and can't send the mail

 

 

Atentamente,

Citlalli Chan

 

Tel. 5539-1123  /  5539-1016

www.acceco.com.mx
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.