Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3426914
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:46:23+00:00 2026-05-18T06:46:23+00:00

i have an issue here, my mails sent from my PHP script never gets

  • 0

i have an issue here, my mails sent from my PHP script never gets delivered to my inbox, but spam instead. Any help on how to get it to the inbox. Thank y’all
Here is my code sample

public function sendMail($name,$email,$message)
{
    $this->validateInput($name,"Empty Name","Invalid Name");
    $this->validateEmail($email,"Empty Email","Invalid Email");
    $this->validateLargeData($message,"Invalid Message","Empty Message","Message Too Short");
    if (empty($this->errors))
    {
        $fromName = $name;
        $fromEmail = $email;
        $from   = "From: $fromName <$fromEmail>\r\n";
        $reply = "Reply-To: $fromEmail\r\n";    
        $mime = "MIME-Version: 1.0\r\n";
        $content = "Content-Type: text/html; charset=ISO-8859-1\r\n";
        $headers = $from.$reply.$mime.$content;
        if (mail("support@findit.com.ng","Contact",$message,$headers))
        {
            echo "<div class='success1'>Thank you $name, we will get back you immediately.</div>";
        }

    }
    else
    {
        echo "<div class=''>";
        echo "</div>";
    }
}

edit
Pls here is the header information i am using

$fromName = $name;
$fromEmail = $email;
$from   = "From: $fromName <$fromEmail>\r\n";
$reply = "Reply-To: $fromEmail\r\n";    
$mime = "MIME-Version: 1.0\r\n";
$content = "Content-Type: text/html; charset=ISO-8859-1\r\n";
$mailer = "X-Mailer: PHP's mail() Function";
$headers = $from.$reply.$mime.$content.$mailer;

@cyberomin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:46:24+00:00Added an answer on May 18, 2026 at 6:46 am

    Make sure your headers are complete:

    $headers = "MIME-Version: 1.0\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\n";
    $headers .= "From: aaa.bbb <aaa@bbb.ccc>\n";
    $headers .= "X-Mailer: PHP's mail() Function\n";
    mail("xxx@yyy.zzz", "subject","message",$headers); 
    

    And if you are on shared hosting, it might be that there’s a blacklisted spammer on your ip.

    The best suggestion I can probably make is to try a different way of sending your emails. For example phpmailer or Swift Mailer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a curious issue here In my ejbCreate() method from where i insert
I have an issue going on here. I am using PHP to get values
Having an issue here that I have tried everything I can think of but
I am stuck with a peculiar issue here. I have a script that basically
I have a strange issue with sending a mail with php, here is my
I'm have a weird issue here. I have a UITableView using custom UITableViewCells. Everything
Hey guys I have a little issue here. I have a panel where I
I'm not sure if I have a threading issue here or not. On the
I have a really weird issue here. I'm using my local development server right
im having a little issue here. I have MediaElement.js set on my project. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.