PHP contact form is not sending if the user use an @yahoo domain -


i notice problem contact form in our web site, working fine email user may use, if user use @yahoo mail, contact form not send information. contact form sends copy sender, , copy of email reach yahoo account.

i tried change mail header, 1 of server, adding replay-to.(sending there user mail) users can write each other without problem.

but again contact form works fine domain except yahoo.

please, kind revise code , see if wrong it.

<?php   $_post['email'] = trim($_post['email']); if($_post['email']=='test@ex.com'){   //hwsessionsetvar('img_verify_skipped', 6);   hwsessionsetvar('cinfo',$_post['name']."\n".$_post['email']."\n".$_post['phone']);   die('test mode'); } if($_post['name']=='' or $_post['email']=='' or $_post['phone']=='' or     $_post['message']=='' or !isemail($_post['email'])) { echo '<script language="javascript" type="text/javascript">javascript:history.back(alert("error: favor de llenar todos los campos con la informacion correcta e intentarlo de nuevo"));</script>'; exit; } else {  require_once site_path.'modules/captcha/class.image_verify.php'; $o_iv = new image_verify; if(!$o_iv->istextok(false,5)){    echo '<script language="javascript" type="text/javascript">javascript:history.back(alert("'.hwlng('err_img_code').'"));</script>';   exit; }   //mysql_connect('localhost','alex_4email','sys4se') or die ('error de conexion'.mysql_error()); //mysql_select_db('alex_cl4');  $id_cc = (int)$_post['id_cc']; list($uid,$l_title,$l_descr,$l_price,$l_email) = $db->one_row("select userid,v_title,v_descr,v_price,hw_email ".tbl_ad." link_id=".$id_cc); if(!$uid) die('access denied');  list($to,$cc,$en_ad_email) = $db->one_row("select email,email_2,hw_en_ad_email ".tbl_user." id=".$uid);  if($en_ad_email && isemail($l_email)){   $to = $l_email;   $cc = ''; }  //direcciones de email para pruebas //$to = "" ; //$cc = "";  //$cc = "";  $ip = $_server['remote_addr']; $ad_url = 'http://clasificadoscontacto.com/'.hwgetadurl($id_cc);//index.php?page=out&id='.$id_cc; if(en_se_adv) hwprocesstags($ad_url);  /****************construye email avisa  cliente*****************************/ $s1_to=$to; //cuenta destino $s1_subject="solicitud de informacion en www.clasificadoscontacto.com"; //subject $s1_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" />  //mensaje  //para el envo en formato html //direccin del remitente  if(strpos($_request['name'],"\n")!==false) die('access denied');  $s1_headers = 'from: postmaster@clasificadoscontacto.com' . "\r\n" .           "reply-to:".$_request['name']." <".$_request['email']."> \r\n"; $s1_headers .= "mime-version: 1.0\r\n"; $s1_headers .= "content-type: text/html\r\n";   /****************construye email cc  cliente*****************************/         $s2_tocc=$cc; //cuenta destino          //direccin del remitente         $s2_headers = "from: noreply@clasificadoscontacto.com \r\n";         $s2_headers .= "mime-version: 1.0\r\n";         $s2_headers .= "content-type: text/html\r\n";      if ($cc!="")     {            mail($s2_tocc,$s1_subject,$s1_html,$s2_headers); //hwsendmail($s2_tocc,'noreply@clasificadoscontacto.com',$s1_subject,$s1_html);     } /****************construye email para clasificados contacto y persona que contacta*****************************/     $s_contacto="ayuda@clasificadoscontacto.com"; //cuenta destino     $s_interesado=$_request['email']; //cuenta destino     $s_sub_contacto="www_contacto ".$to.", ".$cc;     $s_sub_interesado="copia de su solicitud en clasificadoscontacto.com"; //subject     $s3_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" />  //mensaje //para el envo en formato html      mail($s_contacto,$s_sub_contacto,$s3_html,$s1_headers);     //hwsendmail($s_contacto,$_request['name']." <".$_request['email'].">",$s_sub_contacto,$s3_html);   mail($s_interesado,$s_sub_interesado,$s3_html,$s2_headers); //hwsendmail($s_interesado,'noreply@clasificadoscontacto.com',$s_sub_interesado,$s3_html);    $l_descr = trim(preg_replace('/\s+/',' ',strip_tags($l_descr)));   $len = descr_max_len>0 ? descr_max_len : 253;   if($len>253) $len = 253;   if($len>0 && strlen($l_descr)>$len) $l_descr = substr($l_descr,0,$len).'..';    $a_v = array('email','name','phone','message');   foreach($a_v $k) $_post[$k] = $_post[$k]!='' ? html_esc(trim(strip_tags($_post[$k]))) : '';   $db->query('insert '.hwmodtable('form_to_email','request').' set lid='.$id_cc.',ts_added=unix_timestamp(),uid='.$uid.     ',ip=?,email=?,name=?,phone=?,msg=?,l_title=?,l_descr=?,l_price=?',  array($_server['remote_addr'],$_post['email'],$_post['name'],$_post['phone'],$_post['message'],$l_title,$l_descr,$l_price) );  /****************************************************************************/                 hwsessionsetvar('cinfo',$_post['name']."\n".$_post['email']."\n".$_post['phone']);    if(mail($s1_to,$s1_subject,$s1_html,$s1_headers)){   //if(hwsendmail($s1_to,$_request['name']." <".$_request['email'].">",$s1_subject,$s1_html)){           header( "location: index.php?page=envio_ok" );       exit;         }         else{            print "the email cannot sent, favor de contactarte con : webmaster@clasificadoscontacto.com";         }   } 

so if user use yahoo account script says: email cannot sent. of kind answers.

hi every 1 want know contact form working domain. problem not code, not yahoo, problem in spam rulers on server, somehow blocking yahoo. –


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -