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

  • Home
  • SEARCH
  • 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 6136181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:34:19+00:00 2026-05-23T17:34:19+00:00

I am writing a script that needs to send an e-mail through the PHP

  • 0

I am writing a script that needs to send an e-mail through the PHP mail function. As it is written below, it works when sending an e-mail to a gmail account, but not an account on my domain. We are running an Exchange server. As of now, the e-mails are sent from _www@server. Does anyone know of an issue with php mail and Exchange (or maybe even e-mail addresses beginning with an underscore and Exchange??)? Or perhaps there is another issue here? The mail function will return true no matter what.

Thank you,

Jeff

$user = $_POST['email'];

$to = "someone@domain.org";

$subject = "Request to Reset EduTube Password";

$body = "Thank you " . $_POST['email'] . " for using the EduTube Password Reset System.\n\n";
$body .= "Please click the following link, or copy & paste it into your browser to reset your password.\n\n";
$body .= "http://testing.domain.org/reset.php?user=" . $user;

$headers = "From: someone@domain.org";

$from = "EduTube Password Reset System";

if (mail($to, $subject, $body, $headers)){

echo "Your email has been sent.  Please check your inbox shortly.";
echo "<br/><a href='http://testing.domain.org'>Click</a>";

}
  • 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-23T17:34:20+00:00Added an answer on May 23, 2026 at 5:34 pm

    mail()’s delivery function ends when it hands off your mail to the SMTP server. Its sole responsibility is the real-world equivalent of taking your envelope and dropping it into the mailbox on the corner. The rest of the postal service (emptying that box, running it through processing centers, flying it to the recipient’s country/city, etc…) is completely outside of mail()’s scope. As long as the envelope drops into the mailbox, mail() will return true and pretend it was delivered.

    So… check your SMTP server’s logs to see what really happened to the mail. Maybe it got marked as spam by the receiver and bounced. Maybe it’s stuck in a queue somewhere, etc… Only the logs will tell you this – anything you can see/do in PHP is useless, because PHP and mail() only do maybe 1% of the email sending/delivery process, and something’s wrong in that other 99%.

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

Sidebar

Related Questions

I'm writing a simple script for my webby that would send me an e-mail
I'm writing a PHP competition script for a members site that needs to restrict
I'm writing a bash script that needs to delete old files. It's currently implemented
I'm writing a small shell script that needs to reverse the lines of a
I was thinking of writing a PHP script that would analyse a CMS'd page's
I'm writing a script in PHP that compares people together based on the number
I am writing a script that needs to add DOM elements to the page,
I'm writing a batch script that needs to install Microsoft Lync if the user
I am writing a bash script that needs to print the date of the
I'm writing a little Ruby script ( on Windows XP) that needs check ENV

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.