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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:58:07+00:00 2026-06-16T01:58:07+00:00

I upgraded my local server using XAMPP 1.8.0 which contains Apache 2.4.2, PHP 5.4.5

  • 0

I upgraded my local server using XAMPP 1.8.0 which contains Apache 2.4.2, PHP 5.4.5 and MySQL 5.5.
I send mails with PHP mail() function by running MercuryMail, but no email received in my inbox.
Sending mails are working when I tested with Mozilla Thunderbird. And the mail() function seems to be working with no error issued.

I checked php.ini in my XAMPP installation path D:\xampp\php. I saw this below

[mail function]  
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury  
; SMTP = localhost  
; smtp_port = 25  

; For Win32 only.  
; http://php.net/sendmail-from  
; sendmail_from = postmaster@localhost  

; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesD:\xampp) fakemail and mailtodisk do not work correctly.  
; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.    

; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)  
; sendmail_path = "\"D:\xampp\sendmail\sendmail.exe\" -t"  

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:\xampp\mailoutput folder  
; sendmail_path = "D:\xampp\mailtodisk\mailtodisk.exe"  

I tweaked some combination of SMTP settings.
I commented out host and port

; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury  
SMTP = localhost  
smtp_port = 25

I commented out sendmail_path, but it did not work. Mail could not be sent.

; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)  
sendmail_path = "\"D:\xampp\sendmail\sendmail.exe\" -t"  

Again, I commented out anothor sendmail_path to work with mailToDisk

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:\xampp\mailoutput folder  
sendmail_path = "D:\xampp\mailtodisk\mailtodisk.exe"  

It seems working, but no mail received in inbox. Nothing found in D:\xampp\mailoutput

In php mail log (D:\xampp\php\logs\php_mail.log), I found several log lines which likely saying mails were sending.

mail() on [D:\xampp\htdocs\....:127]: To: sithu@localhost.com -- Headers: MIME-Version: 1.0  Content-type: text/html; charset=text/html  Return-Path:Sithu <stk@localhost.com>  From: Sithu <stk@localhost.com>  Reply-To: Sithu <stk@localhost.com>  
mail() on [D:\xampp\htdocs\....:127]: To: test@localhost.com -- Headers: MIME-Version: 1.0  Content-type: text/html; charset=text/html  Return-Path:admin@localhost.com  From: admin@localhost.com  Reply-To: admin@localhost.com  
mail() on [D:\xampp\htdocs\....:127]: To: test@localhost.com -- Headers: MIME-Version: 1.0  Content-type: text/html; charset=text/html  Return-Path:Members <admin@localhost.com>  From: Members <admin@localhost.com>  Reply-To: Members <admin@localhost.com> 

I also tried to comment out sendmail_from, but no luck.

; For Win32 only.  
; http://php.net/sendmail-from  
sendmail_from = postmaster@localhost  

Any configuration I’m still missing?

[Edit]
Mercury mail server is running.
Whenever I updated php.ini, I restarted Apache server.

  • 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-06-16T01:58:08+00:00Added an answer on June 16, 2026 at 1:58 am

    I just need to configure D:\xampp\sendmail\sendmail.ini
    By default, it contains the line

    smtp_server=mail.mydomain.com
    

    I had to change it to

    smtp_server=localhost
    

    No need to configure this in the older versions of XAMPP.
    The correct configuration for [mail function] in D:\xampp\php\php.ini is

    ; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
    SMTP = 127.0.0.1
    smtp_port = 25
    
    ; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesD:\xampp) fakemail and mailtodisk do not work correctly.
    ; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.  
    
    ; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
    sendmail_path = "\"D:\xampp\sendmail\sendmail.exe\" -t"
    
    ; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:\xampp\mailoutput folder
    ; sendmail_path = "D:\xampp\mailtodisk\mailtodisk.exe"
    

    Now, I’m receiving mails in my inbox. Please note that “D:\xampp\” is my XAMPP installation path.

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

Sidebar

Related Questions

I am currently running 2 versions of PHP. My local (test) server has 5.3.5,
I was using VisualSVN client and server on local machine + MS Visual Studio
Today I upgraded my local Glassfish server to 3.1.1 in preparation for my company's
I am using an encoded PHP script, which requires SSL support for CURL. I
When using a local NuGet server, whenever I try to install an individual package
While using some of the DateTime Function's at local machine ,later i founded out
Yesterday I was working using MySQL installed on my computer. I downloaded xampp, so
I'm attempting to connect to our exchange server using Mail::IMAPClient but a script that
I just upgraded from ColdFusion9 to ColdFusion10 on OS X running the included Apache
I upgraded my EntityModel to version 4.3 using NuGet . Now i want to

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.