Tema: mail con php
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/04/2008, 13:17
Avatar de ongraphic
ongraphic
 
Fecha de Ingreso: marzo-2008
Ubicación: Bogotá Colombia
Mensajes: 24
Antigüedad: 16 años
Puntos: 0
Re: mail con php

Lo primero es verificar lo que dice c_keeper y si te sirve de algo aqui tengo un codigo que me funciona bien en un servidor con php:

archivo html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>

<body>

<form id="contacto" name="contacto" action="datos.php" method="POST">
<table align="center" border="0">
<tr>
<td align="left" width="100">NOMBRE:</td>
<td align="center" width="150"><input name="nombre" type="text" id="nombre" onblur="MM_validateForm('nombre','','R');return document.MM_returnValue" size="30" /></td>
<td><span class="style2">
*</span></td>
</tr>
<tr>
<td align="left" width="100">EMPRESA:</td>
<td align="center" width="150"><input name="empresa" type="text" id="empresa" onblur="MM_validateForm('empresa','','R');return document.MM_returnValue" size="30" /></td>
<td><span class="style2">
*</span></td>
</tr>
<tr>
<td align="left" width="100">E-MAIL:</td>
<td align="center" width="150"><input name="mail" type="text" id="mail" onblur="MM_validateForm('mail','','NisEmail');retu rn document.MM_returnValue" size="30" /></td>
<td><span class="style2">
*</span></td>
</tr>
<tr>
<td align="left" width="100">TELEFONO:</td>
<td align="center" width="150"><input name="telefono" type="text" id="telefono" onblur="MM_validateForm('telefono','','R');return document.MM_returnValue" size="30" /></td>
<td>
<span class="style2">*</span></td>
</tr>
<tr>
<td align="left" width="100"> MENSAJE:</td>
<td><textarea name="mensaje" cols="40" rows="8" id="mensaje"></textarea></td>
</tr>
<tr>
<td widht="100"></td>
<td align="right" width="150"><input name="Submit" type="submit" onclick="MM_validateForm('nombre','','R','empresa' ,'','R','mail','','RisEmail','telefono','','R');re turn document.MM_returnValue" value="Enviar" /></td>
</tr>
</TABLE>
<p class="style2">* Campo obilgatorio</p>
</FORM>

</body>

</html>

archivo datos.php


<?
$nombre = $_POST['nombre'];
$mail = $_POST['mail'];
$empresa = $_POST['empresa'];
$telefono = $_POST['telefono'];

$mensaje = 'From: ' . $mail . " \r\n";

$header = "Este mensaje fue enviado por " . $nombre . ", de la empresa " . $empresa . " \r\n";
$header .= "Su e-mail es: " . $mail . ", Su telefono es: " . $telefono . " \r\n";
$header .= "Mensaje: " . $_POST['mensaje'] . " \r\n";
$header .= "Enviado el " . date('d/m/Y', time());


$para = '[email protected]';

mail($para,$mensaje,$header);

echo "<script languaje=javascript> alert('Su mensaje fue enviado correctamente') </script>";
echo "<script languaje=javascript> document.location='inicio.html' </script>";
?>

importante guardar el php como datos.php


saludos

espeor te sirva