Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/05/2007, 06:38
JuanMi23
 
Fecha de Ingreso: abril-2007
Mensajes: 54
Antigüedad: 17 años
Puntos: 1
Re: No me va mi correo con este php

Primero Poner Cera luego Pulir Cera...

Suele pasar que a veces toquemos algo y algo que iba el primer dia, al dia siguiente pete. No te preocupes...A mi me paso algo por el estilo...que a hotmail no me enviaba biena la funcion mailto y luego en otros mails services si.

Te pego un codigo sencillito y que a mi me funciona y a partir de ahi a tirar millas

Código PHP:
<?php

 $dest 
"[email protected]";
  
 
$head .= "From: " $_POST['email'] ."\r\n";
 
$head .= "To: [email protected]\r\n";
   
 
// Ahora creamos el cuerpo del mensaje
 
$msg "------------------------------- \n";
 
$msg.= "         INFORMATION            \n";
 
$msg.= "------------------------------- \n";
 
$msg.= "FIRST NAME:   " $_POST['first_name'] . "\n";
 
$msg.= "SURNAME:  " $_POST['surname'] . "\n";
 
$msg.= "EMAIL:    " $_POST['email'] . "\n";
 
$msg.= "DATE OF THE BIRTH:    " $_POST['month'] . " of " $_POST['year'] . "\n";
 
$msg.= "How did you find cube web : " $_POST['inspired_by'] . "\n";
 
$msg.= "------------------------------- \n\n";


// check the email fields for validity
if ($_POST['email'] != $_POST['email_confirmation']) 
{
  echo 
"your <b>email addresses</b> not are same";
}
else
{
$email trim($_POST['email']);

if (!
eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$"$email))
{
echo 
"your <b>email address</b> is invalid";
}
else
{
 if (
mail($dest"SUBSCRIBE CUBE"$msg$head)) {
  echo 
$msg;
  
?>
  <p align="center"><img src="../../images/photofict/thanks.gif" width="386" height="165" /><br />
  <a href="../../pages/mag.htm"><img src="../../images/photofict/clickhere.gif" width="360" height="207" border="0" /></a></p>
  
 <?php
 

 else {
  echo 
"Send Error.";
 }
 }}

?>