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 6851429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:14:49+00:00 2026-05-27T01:14:49+00:00

For some reason, my PHP mail is not sending. This is my script: $tom

  • 0

For some reason, my PHP mail is not sending.

This is my script:

$tom = $email;
$subjm = 'Company: Forgotten password';
$msgm = "-- DO NOT REPLY TO THIS EMAIL --\nHi,\nYou have forgotten your password.\nHereby we want to supply a you a new one.\nNew password: $pass";
$msgm = wordwrap($msgm, 70);
$mail_sent = @mail($tom, $subjm, $msgm);
echo "$tom <br /> $subjm <br /> $msgm";
echo $mail_sent ? "Mail sent" : "Mail failed";
echo "<br />Your new password has been sent to the email you've signed up with.<br />If you can't find the email, please wait a few minutes or check your spam box.";

However, it always gives me “Mail failed”, and I do not see it in mailbox. I’ve checked if the correct emailadress was being produced by my script ($email), and it was. So I’m kinda lost as to why it will not send.

  • 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-27T01:14:49+00:00Added an answer on May 27, 2026 at 1:14 am

    As a follow up to the comments, I contacted my webhost. They tell me I can’t send emails using the mail function to recipients that are not on the domain. I’m resolving the issue with them.

    Edit:

    I needed to add a From:, and the emailadress of From should be a @mydomain.com address, not external. It works now.

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

Sidebar

Related Questions

For some reason This php script won't echo anything: <?php setcookie(pop,'hi',time()+604800); echo $HTTP_COOKIE_VARS['pop']; ?>
For some reason this PHP code below will not work, I can not figure
For some reason, when php mail() is sent to a text number (via email)
Okay so im working on this php image upload system but for some reason
For some reason I never see this done. Is there a reason why not?
Hi guys for some weird reason I'm unable to send email using zend mail
I'm using a script to create an email message, but for some reason, it
I've included a file in my php script, but for some reason, it can't
For some reason one installation of Moodle 1.9.3+ has a problem that file.php returns
I know PHP 5 already supports SQLite but for some reason I can't get

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.