Sendmail problem xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Sendmail problem xampp

Postby pavlito » 04. April 2016 16:26

Hi guys,

I have created landing page, with form submission > to send mail.

Php mail function is used.
When i send email nothing happens. I am using gmail smpt parameters.

changed sendmail.ini

Code: Select all
smtp_server=smtp.gmail.com

; smtp port (normally 25)

smtp_port=465
; SMTPS (SSL) support
;   auto = use SSL for port 465, otherwise try to use TLS
;   ssl  = alway use SSL
;   tls  = always use TLS
;   none = never try to use SSL

smtp_ssl=ssl
auth_username= mymail@gmail.com
auth_password= pass

; if your smtp server uses pop3 before smtp authentication, modify the
; following three lines.  do not enable unless it is required.

pop3_server=
pop3_username=
pop3_password=

; force the sender to always be the following email address
; this will only affect the "MAIL FROM" command, it won't modify
; the "From: " header of the message content

force_sender= mymail@gmail.com



And php.ini

Code: Select all
[mail function]
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
 SMTP = smtp.gmail.com   
 smtp_port = 465

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = postmaster@localhost
sendmail_from = mymail@gmail.com
; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. 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 (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 = "\"C:\xampp\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"


Also , i have enable use of less secure apps under security settings on Google.

Here is apache error log (i tried disabling skype, running xampp as administrator)

Code: Select all
[Mon Apr 04 16:40:12.235669 2016] [ssl:warn] [pid 17484:tid 736] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 04 16:40:12.304689 2016] [core:warn] [pid 17484:tid 736] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Apr 04 16:40:12.437681 2016] [ssl:warn] [pid 17484:tid 736] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 04 16:40:12.483694 2016] [mpm_winnt:notice] [pid 17484:tid 736] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.15 configured -- resuming normal operations
[Mon Apr 04 16:40:12.483694 2016] [mpm_winnt:notice] [pid 17484:tid 736] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Mon Apr 04 16:40:12.483694 2016] [core:notice] [pid 17484:tid 736] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Mon Apr 04 16:40:12.486684 2016] [mpm_winnt:notice] [pid 17484:tid 736] AH00418: Parent: Created child process 6916
[Mon Apr 04 16:40:13.023714 2016] [ssl:warn] [pid 6916:tid 748] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 04 16:40:13.221727 2016] [ssl:warn] [pid 6916:tid 748] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 04 16:40:13.267728 2016] [mpm_winnt:notice] [pid 6916:tid 748] AH00354: Child: Starting 150 worker threads.
[Mon Apr 04 17:09:47.327827 2016] [ssl:warn] [pid 4260:tid 736] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 04 17:09:47.398830 2016] [core:warn] [pid 4260:tid 736] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Apr 04 17:09:47.533836 2016] [ssl:warn] [pid 4260:tid 736] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 04 17:09:47.578842 2016] [mpm_winnt:notice] [pid 4260:tid 736] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.15 configured -- resuming normal operations
[Mon Apr 04 17:09:47.578842 2016] [mpm_winnt:notice] [pid 4260:tid 736] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Mon Apr 04 17:09:47.578842 2016] [core:notice] [pid 4260:tid 736] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Mon Apr 04 17:09:47.580842 2016] [mpm_winnt:notice] [pid 4260:tid 736] AH00418: Parent: Created child process 8008
[Mon Apr 04 17:09:48.122870 2016] [ssl:warn] [pid 8008:tid 748] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 04 17:09:48.320881 2016] [ssl:warn] [pid 8008:tid 748] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 04 17:09:48.364900 2016] [mpm_winnt:notice] [pid 8008:tid 748] AH00354: Child: Starting 150 worker threads.
pavlito
 
Posts: 7
Joined: 03. June 2015 21:40
Operating System: Windows 7

Re: Sendmail problem xampp

Postby Nobbie » 04. April 2016 18:09

>sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

This looks very strange, i would try this one instead:

Code: Select all
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"


or

Code: Select all
sendmail_path = "C:/xampp/sendmail/sendmail.exe -t"
Nobbie
 
Posts: 13171
Joined: 09. March 2008 13:04

Re: Sendmail problem xampp

Postby pavlito » 05. April 2016 08:46

The problem still remains.... ?

Code: Select all
[Tue Apr 05 09:44:00.588607 2016] [ssl:warn] [pid 7084:tid 756] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 09:44:00.650612 2016] [core:warn] [pid 7084:tid 756] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Tue Apr 05 09:44:00.784618 2016] [ssl:warn] [pid 7084:tid 756] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 09:44:00.827638 2016] [mpm_winnt:notice] [pid 7084:tid 756] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.15 configured -- resuming normal operations
[Tue Apr 05 09:44:00.827638 2016] [mpm_winnt:notice] [pid 7084:tid 756] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Tue Apr 05 09:44:00.827638 2016] [core:notice] [pid 7084:tid 756] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Tue Apr 05 09:44:00.829638 2016] [mpm_winnt:notice] [pid 7084:tid 756] AH00418: Parent: Created child process 7844
[Tue Apr 05 09:44:01.352650 2016] [ssl:warn] [pid 7844:tid 748] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 09:44:01.548660 2016] [ssl:warn] [pid 7844:tid 748] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 09:44:01.591680 2016] [mpm_winnt:notice] [pid 7844:tid 748] AH00354: Child: Starting 150 worker threads.
[Tue Apr 05 09:44:13.536158 2016] [ssl:warn] [pid 2228:tid 736] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 09:44:13.600176 2016] [core:warn] [pid 2228:tid 736] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Tue Apr 05 09:44:13.737169 2016] [ssl:warn] [pid 2228:tid 736] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 09:44:13.782177 2016] [mpm_winnt:notice] [pid 2228:tid 736] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.15 configured -- resuming normal operations
[Tue Apr 05 09:44:13.782177 2016] [mpm_winnt:notice] [pid 2228:tid 736] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Tue Apr 05 09:44:13.782177 2016] [core:notice] [pid 2228:tid 736] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Tue Apr 05 09:44:13.783171 2016] [mpm_winnt:notice] [pid 2228:tid 736] AH00418: Parent: Created child process 15476
[Tue Apr 05 09:44:14.316202 2016] [ssl:warn] [pid 15476:tid 748] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 09:44:14.511215 2016] [ssl:warn] [pid 15476:tid 748] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 09:44:14.554215 2016] [mpm_winnt:notice] [pid 15476:tid 748] AH00354: Child: Starting 150 worker threads.
pavlito
 
Posts: 7
Joined: 03. June 2015 21:40
Operating System: Windows 7

Re: Sendmail problem xampp

Postby Nobbie » 05. April 2016 10:35

There is no error message in your error log, sorry i have no idea what is going wrong.

P.S.: I just found this one in php.ini

SMTP = smtp.gmail.com
smtp_port = 465


That does not work, you must comment out these lines (or delete them), put a semicolon in the first column.
Nobbie
 
Posts: 13171
Joined: 09. March 2008 13:04

Re: Sendmail problem xampp

Postby pavlito » 05. April 2016 11:43

I did that also.

Now when i look at error log for sendmail here is what i got

Code: Select all
16.04.05 12:37:10 : Socket Error # 10060<EOL>Connection timed out.
16.04.05 12:37:48 : Connection Closed Gracefully.
16.04.05 12:39:30 : Connection Closed Gracefully.
pavlito
 
Posts: 7
Joined: 03. June 2015 21:40
Operating System: Windows 7

Re: Sendmail problem xampp

Postby pavlito » 05. April 2016 11:49

The SENDMAIL.exe is set to compatibility for Win 7 (current i am using win8), and to run as administrator.

The problem now is that cmd windows (sendmail process), wont turn off. Here is print screen Image .

When i force to close on X button, sometimes i got sent OK.

Here is php code

Code: Select all
<?php
//Send mail


$to = 'pavlito1988@gmail.com';
$subject = 'Test email';
$message = "Hello World!\n\nThis is my first mail.";
$headers = "From: webdizajn.socgen@gmail.com\r\nReply-To:webdizajn.socgen@gmail.com";
$mail_sent = @mail( $to, $subject, $message, $headers );
echo $mail_sent ? "Mail sent" : "Mail failed";

ini_set('display_errors', 1);
error_reporting(E_ALL);
?>
pavlito
 
Posts: 7
Joined: 03. June 2015 21:40
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 78 guests