Foros del Web » Programando para Internet » PHP »

Problema con script php y envio de correos hacia hotmail

Estas en el tema de Problema con script php y envio de correos hacia hotmail en el foro de PHP en Foros del Web. Hola, antes que todo un cordial saludo a todos los usuarios de esta comunidad, soy nuevo en el foro. Solicito ayuda para el siguiente problema ...
  #1 (permalink)  
Antiguo 14/10/2010, 20:55
 
Fecha de Ingreso: octubre-2010
Mensajes: 1
Antigüedad: 13 años, 6 meses
Puntos: 0
Exclamación Problema con script php y envio de correos hacia hotmail

Hola, antes que todo un cordial saludo a todos los usuarios de esta comunidad, soy nuevo en el foro.

Solicito ayuda para el siguiente problema

sucede que tengo un script en php, del tipo recomendar a un amigo (tell to friend) que funciona perfectamente con Gmail, Yahoo, etc, pero no con Hotmail, (los envios hacia Hotmail no resultan, ni siquiera van a la carpeta de "correos no deseados" sencillamente no parece funcionar con Hotmail) me gustaria solucionar este pequeño problema ya que lamentablemente el servicio de correos de Hotmail, sigue siendo uno de los mas usados

puesto que el script funciona perfectamente para otros servicios de correo, excepto con Hotmail, deduzco que el problema esta en Hotmail.

alguien me podria sugerir alguna solución, alguna manera de adaptar el script para que funcione con Hotmail, el script en funcion es el siguiente:

1) Archivo tellfriend.php

Código PHP:
<?php


// This following statement must be left intact.
// Copyright (c) Michael Bloch and Taming The Beast.  
// Tell-A-Friend script V 1.3  Updated September 20 2006
// Taming the Beast.net - tamingthebeast.net
// Free Web Marketing and Ecommerce articles and tools
// By using this code you agree to indemnify Taming the Beast
// from from any liability that might arise from its use. 
// The preceding statement be left intact. 

if(count($_POST)) {
# This section nukes nasty code that a malicious
# party may attempt to inject into the form

foreach(array('friendmail1','friendmail2','friendmail3','email','name') as $key$_POST[$key] = strip_tags($_POST[$key]);
if(!
is_secure($_POST)) { die("Asta la vista Hacker");}

# This section sends an email to you when 
# the form is used

// Your email address (for copies to be sent to you)
$emailto "aqui mi e-mail"

// Your email subject text
$esubject "A page has been sent"

// The email text for copies sent to you
$emailtext "
$_POST[name] has used the tell-a-friend form. Their email address is $_POST[email]

The people they have recommended your site to are:

$_POST[friendmail1]
$_POST[friendmail2]
$_POST[friendmail3]

"
;

# This sends the email to you

@mail("$emailto"$esubject$emailtext"From: $_POST[email]");

# This section sends to the recipients

// Target page after successful submission
// Change thankyou.htm to suit

$thankyoupage "thankyou.htm"

// Change the subject text below to suit

$tsubject "A web site recommendation from $_POST[name]";

// Change the text below for the email 
// Don't change any "$_POST[value]" items

$ttext "
Hi,

A friend or colleague of yours, $_POST[name] , whose email address is $_POST[email] thought you may like to visit our site. 

$_POST[name] has used our Tell-a-Friend form to send you this email.

(aqui la dirección de mi sitio web)

"
;

# This emails the recommendation to the addresses submitted
@mail("$_POST[friendmail1],$_POST[friendmail2],$_POST[friendmail3]"$tsubject$ttext"FROM: $_POST[email]");

# After successful processing, the thank you page
header("Location: $thankyoupage");
exit;

}

# Don't change anything below

function is_secure($ar) {
$reg "/(Content-Type|Bcc|MIME-Version|Content-Transfer-Encoding)/i";
if(!
is_array($ar)) { return preg_match($reg,$ar);}
$incoming array_values_recursive($ar);
foreach(
$incoming as $k=>$v) if(preg_match($reg,$v)) return false;
return 
true;
}

function 
array_values_recursive($array) {
$arrayValues = array();
foreach (
$array as $key=>$value) {
if (
is_scalar($value) || is_resource($value)) {
$arrayValues[] = $value;
$arrayValues[] = $key;
}
elseif (
is_array($value)) {
$arrayValues[] = $key;
$arrayValues array_merge($arrayValuesarray_values_recursive($value));
}
}
return 
$arrayValues;
}
?>
2) Archivo recommend.htm

Código HTML:
<html> 
<head>
<title>tell a friend</title>
<script language="javascript">
<!--

function reset() {
document.tellafriend.name.value="";
document.tellafriend.email.value="";
document.tellafriend.friendmail1.value="";
document.tellafriend.friendmail2.value="";
document.tellafriend.friendmail3.value="";
}

function validate() {


if (document.tellafriend.friendmail1.value.length==0) {
alert("please enter your friend's email address");
return false;
}

if (document.tellafriend.email.value.length==0) {
alert("please enter your email address");
return false;
}
if (document.tellafriend.name.value.length==0) {
alert("please enter your name");
return false;
}

document.tellafriend.submit()
return true;
}

//-->
</script>
</head>
<body onload="reset()" topmargin="0" leftmargin="0"> 
<center>
</center>
<table width="450" cellpadding="0" cellspacing="0" align="center"> 
<tr valign="top"> 
<td valign="middle" align="center"> 
<p>Complete the details below to send our link to your friends.</p> 
<form name="tellafriend" action="tellafriend.php" method="post" onsubmit="return checkfields()"> 
<div align="center">
<center>
<table border="0" cellpadding="10" cellspacing="0">
<tr>
<td> *your name:</td>
<td>
<input size="30" name="name" maxlength="45">
</td>
</tr>
<tr>
<td>*your email:</td>
<td>
<input size="30" name="email" maxlength="45">
</td>
</tr>
<tr>
<td colspan="2">
<p align="center">please enter your friend's email addresses:</td>
</tr>
<tr>
<td>*email 1:</td>
<td>
<input size="30" name="friendmail1" maxlength="45">
</td>
</tr>
<tr>
<td>email 2:</td>
<td>
<input size="30" name="friendmail2" maxlength="45">
</td>
</tr>
<tr>
<td>email 3:</td>
<td>
<input size="30" name="friendmail3" maxlength="45">
</td>
</tr>
<tr>
<td colspan="2">
<p align="center">
The email that will be sent will contain your name and email address. <br>
<input onclick="validate();" type="button" value="click here to send">

</td>
</tr>
</table>
</center>
</div>
</form>
</td>
</tr> 
<tr valign="top"> 
<td valign="middle" align="center"> 
&nbsp;
</td>
</tr> 
</table>
</body>
</html> 
Por supuesto ambos archivos han sido correctamente personalizados para trabajar segun mis necesidades y funcionan perfectamente con todos los servicios de correo excepto con Hotmail

Cualquier sugerencia, posible solución o idea, será bienvenida.

Saludos!
  #2 (permalink)  
Antiguo 15/10/2010, 07:35
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Tema movido desde Configuración PHP a PHP

Etiquetas: correos, envio, hotmail
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:29.