Problema con pagina de contacto

  • Autor Autor shoyle
  • Fecha de inicio Fecha de inicio
S

shoyle

Beta
Diseñador
No recomendado
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Buenas, les agradezco de ante mano la ayuda, tengo esta pagina de contacto que no manda mensajes si el correo del remitente no es de hotmail..... no tengo ni idea de porque les muestro el codigo de contacto.php a ver si me pueden ayudar, gracais

PHP:
<?php
/*
* Contact Form Class
*/


header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json');

$admin_email = '(mi email....)@hotmail.com'; // Your Email
$message_min_length = 5; // Min Message Length


class Contact_Form{
	function __construct($details, $email_admin, $message_min_length){
		
		$this->name = stripslashes($details['name']);
		$this->email = trim($details['email']);
		$this->subject = 'Mensaje enviado desde Prefaburuguay'; // Subject 
		$this->message = stripslashes($details['message']);
	
		$this->email_admin = $email_admin;
		$this->message_min_length = $message_min_length;
		
		$this->response_status = 1;
		$this->response_html = '';
	}


	private function validateEmail(){
		$regex = '/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i';
	
		if($this->email == '') { 
			return false;
		} else {
			$string = preg_replace($regex, '', $this->email);
		}
	
		return empty($string) ? true : false;
	}


	private function validateFields(){
		// Check name
		if(!$this->name)
		{
			$this->response_html .= '<p>Ingrese un nombre.</p>';
			$this->response_status = 0;
		}

		// Check email
		if(!$this->email)
		{
			$this->response_html .= '<p>Ingrese una direccion de e-mail.</p>';
			$this->response_status = 0;
		}
		
		// Check valid email
		if($this->email && !$this->validateEmail())
		{
			$this->response_html .= '<p>Ingrese una direccion de mail valida.</p>';
			$this->response_status = 0;
		}
		
		// Check message length
		if(!$this->message || strlen($this->message) < $this->message_min_length)
		{
			$this->response_html .= '<p>Ingrese un mensaje. Debe tener al menos '.$this->message_min_length.' caracteres.</p>';
			$this->response_status = 0;
		}
	}


	private function sendEmail(){
		$mail = mail($this->email_admin, $this->subject, $this->message,
			 "From: ".$this->name." <".$this->email.">\r\n"
			."Reply-To: ".$this->email."\r\n"
		."X-Mailer: PHP/" . phpversion());
	
		if($mail)
		{
			$this->response_status = 1;
			$this->response_html = '<p>Gracias! Responderemos a la brevedad.</p>';
		}
	}


	function sendRequest(){
		$this->validateFields();
		if($this->response_status)
		{
			$this->sendEmail();
		}

		$response = array();
		$response['status'] = $this->response_status;	
		$response['html'] = $this->response_html;
		
		echo json_encode($response);
	}
}


$contact_form = new Contact_Form($_POST, $admin_email, $message_min_length);
$contact_form->sendRequest();

?>
 
pero osea los emails no te llegan si no los envian desde un @hotmail?
 
exacto.... si el que escribe pone @yahoo.com no llega
 
¿Estás seguro de que no llega a la Hotmail? ¿Has mirado en el SPAM? En realidad si lo manda a uno, lo debería de mandar a otro, no hay ningún tipo de diferencia en el código para que haga que no te lleguen en los Hotmail.

Lo único que se me ocurre, es que a lo mejor Hotmsail a bloqueado tu dominio ¿Lo estás enviado desde localhost/127.0.0.1?
 
Atrás
Arriba