Avatar of sunhux
sunhux
 asked on

PHP script to emulate POP3 login & retrieval of email from MS Exchange 2010

I currently has a Cerberus application (it's sort of CRM / Call centre tool).
It uses POP3 to login to a couple of my corporate MS Exchange email
accounts to download those emails & then clear/delete those mails from
the Exchange server.

I won't be allowed to use POP3 soon.  Anyone has any PHP or has some
idea on how to write PHP script to emulate POP3 functionality ie download
& clear away the emails.

Cerberus vendor is not providing the script but they told me it's possible to
write such a PHP script.

At least some attempt to write such a script is appreciated even if the
script did not ultimately work.
Email ProtocolsPHPExchange

Avatar of undefined
Last Comment
sunhux

8/22/2022 - Mon
sunhux

ASKER

Google will provide some sample of PHP script to do login but I'll need
something specifically for login to MS Exchange & download emails :

http://www.google.com.sg/#hl=ms&source=hp&biw=954&bih=652&q=sample+PHP+code+for+login&aq=f&aqi=g1&aql=&oq=&fp=3e79c0b357f7acbf
ASKER CERTIFIED SOLUTION
Anglian Learning Technical Services

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
sunhux

ASKER

Yes, I'm interested in knowing further : actually I have 2 apps (Cerberus & BMC Remedy)
that need to download+clear emails from the Exchange server as our corporate has issued
a directive that POP3 on the Exchange server will be discontinued due to security policy.

I think one technical hurdle is whether SOAP could store the downloaded mails in the
required repositories or mail storage formats that are required by Cerberus & Remedy
SOLUTION
Anglian Learning Technical Services

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
sunhux

ASKER

Currently there's a cron job that runs a php job every minute to download the mails
from MS Exchange but I'll collect the code tomorrow (on leave today) :
/usr/bin/wget --no-check-certificate -O /tmp/cron.out -o /tmp/cron.out1 https://localhost/cerberus-gui/cron.php

Let me know how we want to approach this
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
sunhux

ASKER

attached the cron.php script :

I'm not sure if this uses POP3 protocol but would you be able to
amend it to use some other methods (say http service or SOAP or ...)
cronphp.txt
SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
sunhux

ASKER
Thanks v much.

Let me know how I should run your script?  Run every minute from a
cron?  How do I specify the parameters (ie the MS Exchange server
to download from & the mailbox name)


I have an application (called Cerberus) that runs on Linux that uses POP3
method to download the emails : I can download it from MS Exchange
(preferred) or a Linux Postfix (as I've managed to get my Postfix to
receive / send emails).  I also have another app (Remedy) which uses
Windows POP3 to download from MS Exchange.

So the crucial thing is for the script to simulate POP3 action
SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
sunhux

ASKER

In MS Exchange, how does the email handler look like?

For postfix, how does its email handler look like?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
sunhux

ASKER
Ok