-1

I have done everything possible but after registration my email goes to spam and i want it to go into inbox

  $subject = 'Confirm your email';
    $to = $email;
    $headers = "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
    $headers .= 'From: CGOTY <info@cgoty.com>' . "\r\n";
    $body='Hi, Click here to confirm your email https://cgoty.com/activate.php?encrypt='.$encrypt.'&action=activate  ';

mail($to,$subject,$message,$headers);

2 Answers2

0

You made a mistake in your script within you mail contructor of function you said message instead of body message instead of body.

So it should look like this

$body='Hi, Click here to confirm your email https://cgoty.com/activate.php?encrypt='.$encrypt.'&action=activate  ';

mail($to,$subject,$body,$headers);

It will work for you

oviemoses
  • 402
  • 2
  • 6
0

Add this to your header:

$headers .= "Reply-To: $email" . "\r\n";

(replace $email with the mail you want)

itay
  • 357
  • 4
  • 16