php send mail and xampp

I have been using xampp for some time and sending mail from php pages has been working fine (just using the inbuilt mail php functionality)
I am using a local website on windows
I have recently upgraded to windows 10 and mail no longer sends from my computer

Can someone please suggest where I need to check
doctorbillTechAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

systechadminConsultantCommented:
first check if you are able to telnet the port 25
0
Dave BaldwinFixer of ProblemsCommented:
just using the inbuilt mail php functionality
The PHP mail() command requires a SMTP server somewhere to send mail.  It does not do it by itself.  Look at your 'php.ini' and see where your PHP mail() command has been sending to.
0
Dave HoweSoftware and Hardware EngineerCommented:
xampp supplies a mail provider that php uses; I would therefore suspect the win10 firewall is blocking that component - will check tonight if nobody else supplies a solution before then :D
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

doctorbillTechAuthor Commented:
I have checked the php.ini and sendmail.ini settings
These are exactly the same as they were
0
Dave HoweSoftware and Hardware EngineerCommented:
Ok, just tried it here and got "This app can't run on your PC" for the sendmail.exe under Win10 X64. That isn't good :(
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dave HoweSoftware and Hardware EngineerCommented:
OK, try this.
rename sendmail.exe in your xampp/sendmail/ dir to something else, and download msmtp - copy msmtp.exe into /xampp/sendmail/ and rename to sendmail.exe

Now, you will need to configure that. the config file is (confusingly) c:\ProgramData\msmtprc.txt and should have contents as follows (use the below as a template):

host <hostname for mail server to send to>
port <port of mailserver to send to, probably 25>
user <username to log into mailserver>
password <password for above>
domain <name of YOUR server when talking to mailserver>
from <from email address for mail you send>
tls
tls_starttls
tls_certcheck off

Open in new window


replace everything in <> with the real values, removing the <> as well.

that works here, so give it a try. if it is showing issues for you, try the following. Build a "test.txt" file in /xampp/sendmail with the following contents:
To: <your email address>
Subject: Test Email

This is a test email

Open in new window

then open a command prompt, change directory to the /xampp/sendmail dir, and type the following:

type test.txt | sendmail.exe -t

Open in new window


that should show any errors the mail client is generating.
0
Dave BaldwinFixer of ProblemsCommented:
0
doctorbillTechAuthor Commented:
Re this config file:
Do I need to use : after the variable names?

ie. host: smtp.demon.co.uk
or do I just use:
host smtp.demon.co.uk
0
doctorbillTechAuthor Commented:
Also what do I put here as I am sending from a local host:

domain <name of YOUR server when talking to mailserver>
0
Dave HoweSoftware and Hardware EngineerCommented:
no colons, and domain (at least with demon) will be your demon domain. so, assuming you are bill@customer.demon.co.uk:

host smtp.demon.co.uk
port 587
user customer
password ******
domain customer.demon.co.uk
from bill@customer.demon.co.uk
tls
tls_starttls
tls_certcheck off

Open in new window

0
doctorbillTechAuthor Commented:
I am still unsure of the Domain

My smtp server is smtp.demon.co.uk
username is info@ticktockit.net
0
doctorbillTechAuthor Commented:
I have tried this:
-----------
host smtp.demon.co.uk
port 465
user info@ticktockit.net
password ***********
domain ticktockit.net
from info@ticktockit.net
tls
tls_starttls
tls_certcheck off
----------------

The webpage just hangs
0
doctorbillTechAuthor Commented:
If I try running the test.txt command, again the system just sits there - no progress
0
doctorbillTechAuthor Commented:
The result of the above test:
sendmail.exe: the server sent an empty reply
sendmail.exe: could not send mail (account default from C:\ProgramData\msmtprc.txt)
0
doctorbillTechAuthor Commented:
This is my current msmtprc file:

host smtp.demon.co.uk
port 465
user info@ticktockit.net
password ************ (blanked for security)
domain ticktockit.net
from info@ticktockit.net
tls
tls_starttls
tls_certcheck off
0
Dave HoweSoftware and Hardware EngineerCommented:
Config looks good; I have tested against smtp.demon.net myself and it works consistently, once I have authed it though the Windows 10 firewall. Check the config of that firewall to make sure it isn't blocking?
0
doctorbillTechAuthor Commented:
I have allowed port 465 and sendmail.exe through the firewall
Have I missed anything ?
0
Dave HoweSoftware and Hardware EngineerCommented:
not that I can think of. can you use the same credentials in (say) thunderbird, to the same port?
0
doctorbillTechAuthor Commented:
Something else I have found:

If I do the following:
telnet localhost 888
I get a connection to my local xampp servver port

If I do:
telnet localhost 465
telnet localhost 25
There is no response
0
Dave HoweSoftware and Hardware EngineerCommented:
ports open on apache (under xampp) should be configured as apache "listen" lines in the config. localhost 465 or 25 shouldn't respond, so that is correct (the port is at demon, not on the xampp server)
0
doctorbillTechAuthor Commented:
That makes sense - I was not thinking correctly
Basically I am all out of ideas
0
Dave HoweSoftware and Hardware EngineerCommented:
Well, the tool works here on windows 10, so next step is to see if you can get to the demon mail server from another mail client, which is why I suggested Thunderbird. The Openssl binary from the apache bin dir could also be used, but thunderbird is a lot easier :D
0
doctorbillTechAuthor Commented:
I use outlook 2013 which works fine
0
Dave HoweSoftware and Hardware EngineerCommented:
from that machine, with the same smtp host, username, and password settings?
0
doctorbillTechAuthor Commented:
Yes - exactly the same
0
doctorbillTechAuthor Commented:
Still searchin !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.