Xampp Email Problem

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

Xampp Email Problem

Postby Shinamori » 13. October 2017 18:27

Hello,

I'm having trouble using Xampp to send emails through localhost. My code is as follows:
<?php
$emailTo = "myEmail@gmail.com";
$subject = "Feedback";
$content = "test email";
$results = mail($emailTo, $subject, $content);
echo "results: " . $results;
?>

$results returns nothing for some reason. The mail also does not arrive, even though I have set up the gmail account to allow access for insecure apps.

Sendmail looks like:

smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=myEmail@gmail.com
auth_password=myPassword
force_sender=myEmail@gmail.com

And php.ini:

SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = myEmail@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

I'm also getting "[Thu Oct 12 10:25:09.648081 2017] [ssl:warn] [pid 3232:tid 560] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name" in the error log when I restart xampp sometimes, but I can still access localhost and use localhost in my internet browser.

None of the guides I've looked at have helped and I've already tried turning off my firewall/antivirus, using port 465, and checking spam folders in the receiving email address. Could anyone offer me advice on what I can try to do, and also let me know if there are new issues with Xampp, netbeans, or gmail that the online guides might be outdated on? Thanks in advance for any help provided.
Shinamori
 
Posts: 1
Joined: 12. October 2017 20:01
XAMPP version: 3.2.2
Operating System: Windows 10

Re: Xampp Email Problem

Postby Chikwado » 14. October 2017 10:59

You Seem To Have Run Into Some Php Bug. Check The Following File If It Is There: C:/xampp/sendmail/sendmail.exe.
Everyday Coding
User avatar
Chikwado
 
Posts: 16
Joined: 16. July 2014 13:44
Location: Lagos
XAMPP version: 5.6.3
Operating System: Window 7

Re: Xampp Email Problem

Postby Nobbie » 14. October 2017 20:20

And php.ini:

SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = myEmail@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"


You MUST NOT activate SMPT / smtp_port in php.ini, thats wrong. Delete that lines or comment out. The Gmail SMTP server is accessed via sendmail.exe and not twice also via php.ini.
Nobbie
 
Posts: 9771
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 33 guests