How to send email using php from XAMPP - do i need Mercury Mail Server

I'm not what familiar with XAMPP so apologies for the basic question.

Question 1
We have an MS Exchange Server. Can I send emails to Exchange from php via XAMPP webserver without having a mail server (i.e. Mercury Mail Server) installed, but using the webserver as an Exchange client (like outlook)?

Question 2
Previously our webserver was installed in IIS and used SMTP service to send mail,  but since moving to XAMPP on a new server the mail no longer works. Mercury Mail Server is not installed.
There is a receive connector, which worked before, in Exchange. but I get the error  "authentication failure [SMTP: STARTTLS failed (code: 220, response: 2.0.0 SMTP server ready)]"  now.
Was the IIS SMTP service acting as a mail server previously? Can I install the SMTP service on the new webserver or is this I assume part of the Mercury Mail Server install?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

you can use the Exchange to send out the mails. please check the authentication settings on Recevieve connector. You will need to add IP address of the Xampp server in Receive connector to allow relay.

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
EICTAuthor Commented:
Thanks Gaurav
The authentication settings are  TLS and basic authentication for Exchange users and Anonymous users. The scope is set to the webserver IP address.  It's set up the same as before but I had already changed the IP to the new webserver.

Can I confirm I don't need Mercury Mail Server?

No need of mercury server.  Just do few check from webserver:

Telnet the port 25 on Exchange and see what you are getting.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

EICTAuthor Commented:
It's obviously as TLS issue.

Do this 
stops PEAR using TLS so the error goes but it's masking the problem really.
I should be able to use TLS?
you can use the TLS, first provide the report of the telnet port 25 to exchange server.
EICTAuthor Commented:
I can telnet port 25 on exchange server from the webserver
when I type Helo I get a response with mail server name and IP
if I type starttls I get SMTP server ready response
Is this sufficient?
Yes, now you try with Application side and see if you are getting any error?
EICTAuthor Commented:
Yes still getting the errors :-(  I shall check the username and password details in the app in case there is a problem here.
EICTAuthor Commented:
No further forward on this. Everything looks ok. For what it's worth I'm using the PEAR mail class.
EICTAuthor Commented:
I fixed this. Can't remember now what I did but I think it was to do with the permissions in the receive connector.
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
Email Clients

From novice to tech pro — start learning today.