No mail received in inboxes with XAMPP 1.8.0, MercuryMail and mail ()

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 letters with the PHP mail () function by running MercuryMail, but I do not receive the letters in my inbox.
Sending emails works when I tested Mozilla Thunderbird. And the mail () function works with an error.

I checked php.ini on my installation path of XAMPP D: \ xampp \ php . I saw it 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 (eg 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 (eg 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 changed some SMTP settings.
I commented on the 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 on sendmail_path , but that didn't work. Failed to send mail.

 ; 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 on anothor sendmail_path for working 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 to work, but mail is not received in the inbox. Nothing found in D: \ xampp \ mailoutput

In the php email log (D: \ xampp \ php \ logs \ php_mail.log), I found several lines of the log that probably sent messages.

 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 on sendmail_from , but no luck.

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

Any configuration I'm still missing?

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

+6
source share
3 answers

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 older versions of XAMPP.
Correct setting of [mail function] in D: \ xampp \ php \ php.ini -

 ; 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 (eg 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 (eg 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 get mail in my inbox. Please note that "D: \ xampp" is my XAMPP installation path.

+9
source

Make sure the mercury mail server is started, it does not start by default.

0
source
 #GMAIL mit XAMPP 1.8.1 und sendmail [CODE] [sendmail] ; HOTMAIL smtp_server=smtp.gmail.com smtp_port=25 smtp_ssl=tls tls_certcheck off error_logfile=error.log debug_logfile=debug.log auth_username= xxxx.xxxx@gmail.com auth_password=xxxxxxx this settings in php.ini [mail function] ; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury ; SMTP = smtp.gmail.com ; smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from sendmail_from = xxxx.xxxx@gmail.com ; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (eg c:\program filesC:\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 (eg 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 = "\"C:\sendmail\sendmail.exe\" -t" ; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder ;sendmail_path = "C:\xampp\mailtodisk\mailtodisk.exe" ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters = ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename mail.add_x_header = Off ; Log all mail() calls including the full path of the script, line #, to address and headers mail.log = "C:\xampp\php\logs\php_mail.log" 
0
source

All Articles