php - How to prevent mail from going to spam? -


this question has answer here:

below header sent user:

$to="$mail"; $sub="thank you!"; $headers = "mime-version: 1.0\r\n"; $headers .= "content-type:text/html; charset=iso-8859-1\r\n"; $headers .= 'from: example.com <noreply@example.com>' . "\r\n"; $msg="dear $nme ,<br/> received request recover password.<br/> password $pss .";   $response =@mail($to,$sub,$msg,$headers); 

if send through diff sever goes inbox. how can prevent email going spam?

$to='example@gmail.com'; $subject='application form '; $message='testing';   $headers  = 'mime-version: 1.0' . "\r\n";  $headers .= 'content-type: text/html; charset=iso-8859-1' . "\r\n";  $headers .= 'from: admin <admin@gmail.com>' . "\r\n";  if(mail($to,$subject,$message,$headers))  {   echo "mail sent..";   exit;  } 

it works me. can use smtp mail instead of this.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -