0

Good day everyone. AM trying to send mail from my Cpanel but the receiver is not getting the mail. I am using my custom email from my cpanel as sender email.please i need your help. below is my php mail function;

<?php
   
   ini_set('display_errors', 1);
   error_reporting(E_ALL);
                
   $from = 'info@sergiocastro.com.ng';
   $to = $email;
                
   $subject = "Email Verification Code";
   $message = "Your verification code is: $activationCode";
   $headers = 'From:' . $from;
   mail($to, $subject, $message, $headers);
  • I have check my spam and the mails are found in spam instead of inbox. how can i make them go to inbox straight? – Bernard Kortor Mar 16 '21 at 10:01
  • Did you read the complete accepted answer on the duplicated post? There's a complete section about it: _"Check spam folders; prevent emails from being flagged as spam"_ – M. Eriksson Mar 16 '21 at 10:04

0 Answers0