IIS / PHP SMTP on Server 2012 R2 with Exchange 2013


My setup / configuration:

I am currently running Windows Server 2012 R2 with Exchange 2013.

I am hosting a couple of websites/domains on this server with IIS 7, PHP 5.6 and MySQL.

My Exchange server is working fine with the default transport hubs and I have my SMTP routed through a smarthost send connector (AuthSMTP).


My question:

Exchange mail is working perfectly fine, however I'm unable to send emails from my hosted helpdesk software (Kayako), php forms etc.

There is an SMTP option within IIS 7.0 which I have configured with exchange credentials. I also have added SMTP to PHP.ini. Still no good.

There's a SMTP role which can been installed, should I do this? Am I not installing multiple SMTP servers running on port 25?

Is there an easy way to send the mail from IIS / PHP applications through my exchange 2013 smarthost? Is this called a relay connector?

I hope I explained everything clearly enough and thank you in advance for your guidance.
Carl ChandlerAsked:
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.

Amit KumarCommented:
You just need to add your application server IP in Exchange's receive connector, which will relay your e-mails coming from Application.

No need to configure SMTP service on IIS as you already have it on Exchange. Just configure your application code to Exchange SMTP like where it asks for SMTP server point to your mailbox server with port 25. It is your choice you want to configure domain authenticated or anonymous. You may have to enable anonymous authentication on receive connector in Exchange

On the other hand you must use e-mail address which is your accepted domain, if you use diff. e-mail address domain then it is possible your mail will not get relayed.
Carl ChandlerAuthor Commented:
I have added a receive connector for / (localhost and IP of server) and allowed anonymous authentication.

My PHP contact forms now email me.

However, my Kayako desktop software does not. I have tried to set it with PHP sendmail and with SMTP details (my Exchange user account) but it will not email out.

Any ideas?
Amit KumarCommented:  same server which is running PHP contact form and Kayako Desktop?

if Kayako Desktop is diff. then add its IP to receive connector and try.
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Carl ChandlerAuthor Commented:
The same.
Amit KumarCommented:
If PHP is sending and other app is not sending so issue is with Kayako.

can you configure Kayako sending mail as anonymous? if not please check account is being used for SMTP authentication is locked out or something.

Also do one thing on receive connector enable logging and see the logs if it is hitting or not?

This is the article to enable logging on connector.
Carl ChandlerAuthor Commented:
Ok figured it out.

By default the POP and IMAP services are NOT running?

I enabled both of the backend POP and IMAP services and it now works.

Thank you anyways for your effort.

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
Carl ChandlerAuthor Commented:
Solution worked
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
Windows Server 2012

From novice to tech pro — start learning today.