I am currently building an internal employee dashboard for our global company (it is hosted on an external website for logistical reasons)

I'd like (need) to password protect the page as we will be displaying sensitive information, my question is, is it possible to integrate with Outlook passwords?

We have over 350 staff all of whom use outlook on a daily basis, I'd love for the website to check whether the visitor is logged into Outlook and if they're not, prompt them to log in.

Is it possible?? If it is I'll get is developed straight away.

  • 4
    What do you mean by "Outlook password"? Are you running Microsoft Exchange and authenticating against Active Directory or Novell, or are the staff simply using Outlook to connect to IMAP or POP mail?
    – choster
    Sep 13, 2012 at 16:32
  • We are currently using Microsoft Exchange 2010 Sep 18, 2012 at 11:34
  • @JackLockyer - Are the users managed by Active Directory? I have just implemented a very similar solution, but cant help if AD is not being used. Do users access their outlook from home/remote or are they all within a corporate network? Sep 19, 2012 at 14:52
  • Hey, I'm waiting to hear back from IT whether or not we use Active Directory. Users are able to access Outlook remotely Sep 20, 2012 at 11:27

2 Answers 2


Best way to do this, is to create a script that would log in to SMTP account by PHP, with SSL. If the process succeeds - set a cookie/session and let him go on.

Here is some code snippet PHP SMTP mailer

You don't need most of it, just the top part where it try to log


I'd handle protected pages the usual way.

If a user lands on a page with sensitive information you can protect the page this way:

  1. check if the user already is logged in (and eventually has the permissions to see the page)
  2. if True: show content
  3. if False: ask for a username and a password(*)
  4. server side you will check its credential connecting to the mail server using the provided user/pass. If the mail server allows the connection to happen, you can log the user into the site and show the page, otherwise redisplay user/password form.

Authentication (any process by which you verify that someone is who they claim they are) is handled by this procedure. Authorization (any process by which someone is allowed to be where they want to go, or to have information that they want to have) must be coded ad hoc.

(*) To log the user in, the username and password it provides must be the same used in Outlook.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.