Ver Mensaje Individual
  #7 (permalink)  
Antiguo 26/11/2014, 08:47
examplesjquery
 
Fecha de Ingreso: noviembre-2014
Mensajes: 34
Antigüedad: 9 años, 5 meses
Puntos: 0
Respuesta: Formulario de contacto

Hola Buenas mira te dejo dos, tienes que copiar el enlace manualmente por que todavia no me deja crear enlaces, soy nuevo en el foro y aun pues hasta que no tenga 30 articulos no podre hacerlo.


No obstante te mando estos dos enlaces uno para hacerlo en jquery y otro para hacerlo en php. No obstante aqui te dejo el codigo para incluso mandarlo en html, es decir lo que viene a ser un boletin jeje.

PRIMERO
http://www.examplesjquery.com/envio-de-formulario-con-php/

SEGUNDO
http://www.examplesjquery.com/formulario-para-enviar-correos-en-jquery/


Código PHP:
Ver original
  1. <?php
  2.  
  3. $siteaddress='examplesjquery.com';
  4. $sitename='examplesjquery.com';
  5.  
  6.   $cabeceras = 'From: [email protected]' . "\r\n" .
  7.   'Content-type: text/html; charset=iso-8859-1\r\n'
  8.   .
  9.     'Reply-To: [email protected]' . "\r\n" .
  10.     '';
  11.  
  12. $destinatario = "[email protected]";
  13. $asunto = "Contacto desde la web";
  14. $cuerpo = '
  15. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  16.  
  17. <html xmlns="http://www.w3.org/1999/xhtml">
  18.  
  19. <head>
  20.  
  21. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  22.  
  23. <title>'.$sitename.'</title>
  24.  
  25. <style type="text/css">
  26.  
  27. <!--
  28.  
  29. #contenedora {
  30.  
  31.     border: 1px solid #333333;
  32.  
  33. }
  34.  
  35. #contenedora #cabecera {
  36.  
  37.     height: 60px;
  38.  
  39.     border-top-width: 1px;
  40.  
  41.     border-right-width: 1px;
  42.  
  43.     border-bottom-width: 1px;
  44.  
  45.     border-left-width: 1px;
  46.  
  47.     border-top-style: none;
  48.  
  49.     border-right-style: none;
  50.  
  51.     border-bottom-style: solid;
  52.  
  53.     border-left-style: none;
  54.  
  55.     border-top-color: #999999;
  56.  
  57.     border-right-color: #999999;
  58.  
  59.     border-bottom-color: #999999;
  60.  
  61.     border-left-color: #999999;
  62.  
  63. }
  64.  
  65. #contenedora #titular {
  66.  
  67.     font-family: Arial, Helvetica, sans-serif;
  68.  
  69.     font-size: 14px;
  70.  
  71.     background-color: #000000;
  72.  
  73.     padding-top: 2px;
  74.  
  75.     padding-right: 2px;
  76.  
  77.     padding-bottom: 2px;
  78.  
  79.     padding-left: 20px;
  80.  
  81.     color: #FFFFFF;
  82.  
  83.     border-top-width: 1px;
  84.  
  85.     border-right-width: 1px;
  86.  
  87.     border-bottom-width: 1px;
  88.  
  89.     border-left-width: 1px;
  90.  
  91.     border-top-style: none;
  92.  
  93.     border-right-style: none;
  94.  
  95.     border-bottom-style: solid;
  96.  
  97.     border-left-style: none;
  98.  
  99.     border-top-color: #CCCCCC;
  100.  
  101.     border-right-color: #CCCCCC;
  102.  
  103.     border-bottom-color: #CCCCCC;
  104.  
  105.     border-left-color: #CCCCCC;
  106.  
  107. }
  108.  
  109. #contenedora #contenido {
  110.  
  111.     padding-top: 10px;
  112.  
  113.     padding-right: 20px;
  114.  
  115.     padding-bottom: 10px;
  116.  
  117.     padding-left: 20px;
  118.  
  119.     font-family: Arial, Helvetica, sans-serif;
  120.  
  121.     font-size: 12px;
  122.  
  123.     color: #858585;
  124.  
  125. }
  126.  
  127. #contenedora #contenido a {
  128.  
  129.     color: #000000;
  130.  
  131. }
  132.  
  133. #contenedora #pie {
  134.  
  135.     text-align: center;
  136.  
  137.     font-family: "Times New Roman", Times, serif;
  138.  
  139.     font-size: 14px;
  140.  
  141.     font-weight: bold;
  142.  
  143.     color: #FFFFFF;
  144.  
  145.     background-color: #4e4250;
  146.  
  147.     padding: 5px;
  148.  
  149. }
  150.  
  151. -->
  152.  
  153. </style>
  154.  
  155. </head>
  156.  
  157. <body>
  158.  
  159. <table width="500" border="0" cellpadding="0" cellspacing="0" id="contenedora" align="center">
  160.  
  161.  <tr>
  162.  
  163.    <td id="cabecera"><img src="http://www.tuweb.com/images/cabeceramail.jpg" alt="Cabecera de '.$sitename.'" width="600" height="84"  /></td>
  164.  
  165.  </tr>
  166.  
  167.  <tr>
  168.  
  169.    <td id="titular">Consulta desde la web</td>
  170.  
  171.  </tr>
  172.  
  173.  <tr>
  174.  
  175.    <td id="contenido">
  176. <p>Nombre: '.$_POST['nombre'].'</p>
  177.  
  178. <p>Telefono:'.$_POST['telefono'].'</p>
  179.  
  180. <p>Telefono:'.$_POST['email'].'</p>
  181.  
  182. <p>Comentarios:'.$_POST['comentarios'].'</p>
  183.  
  184. <p>'.$sitename.'<br>
  185.  
  186. <a href="'.$siteaddress.'">'.$siteaddress.'</a><br>
  187.  
  188. <br><br></td>
  189.  
  190.  </tr>
  191.  
  192.  <tr>
  193.  
  194.    <td id="pie">&copy; '.$sitename.' 2011 </td>
  195.  
  196.  </tr>
  197.  
  198. </table>
  199.  
  200. </body>
  201.  
  202. </html>';
  203.  
  204. //echo "Enviado al usuario";
  205.  
  206. // fin del envio al usuario  en html
  207.  
  208. /*******************************************************
  209.  
  210. ENVIO DE CONFIRMACIÓN DE ENVIO DE CONSULTA AL CLIENTE (EMPRESA)
  211.  
  212. *******************************************************/
  213.  
  214. //para el envío en formato HTML
  215.  
  216. //ruta del mensaje desde origen a destino
  217.  
  218. //$headers .= "Return-path: ".$adminaddress."\r\n";
  219.  
  220. //direcciones que recibián copia
  221.  
  222. //$headers .= "Cc: [email protected]\r\n";
  223.  
  224. //direcciones que recibirán copia oculta
  225.  
  226. //$headers .= "Bcc: [email protected],[email protected]\r\n";
  227.  
  228. mail($destinatario,$asunto,$cuerpo,$cabeceras);
  229. //echo "Enviado al Cliente (empresa)";
  230. // fin del envio al usuario  en html
  231.  
  232. ?>
  233.  
  234. <P align="center"><b>LE AGRADECEMOS TUS COMENTARIOS</B><br />
  235. le agradece su consulta o comentario</p>
  236. <p align="center"> Intentaremos responderle lo antes posible</P>