receive emails in coldfusion

I would like to receive emails from exchange server and use it in coldfusion.
How do I go about doing this? Don't want to use POP3. Please help ASAP
cfuserAsked:
Who is Participating?

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

x
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.

Brijesh ChauhanStaff IT EngineerCommented:
Which version of CF you are on ?

you can use the CFEXCHANGE tag if you are on CF 8 and above

here is the article with complete information

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=cfexchange_5.html
cfuserAuthor Commented:
I tried using cfexchange tag and I get connection to server refused. I am passing username, password and server IP correctly. Any thoughts?

Connection is refused.  
Ensure that the Exchange server is running and that it supports the protocol (HTTP or HTTPS) you have specified for accessing it.  
cfuserAuthor Commented:
I am using CF9
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

Brijesh ChauhanStaff IT EngineerCommented:
cfuserAuthor Commented:
Thanks much. I tried the below code and get the same connection refused message.

<cfexchangeConnection
action="open"
username ="MHSSD_EventMgmt"
password="Password12345**"
server="#serverIP#"
protocol="https"
connection="testconn"
formBasedAuthentication="true"
formBasedAuthenticationURL="https://#serverIP#/owa/auth/owaauth.dll">

<cfdump var="#testconn#">

<cfexchangeConnection
action="close"
connection="testconn">
SidFishesCommented:
Try this connection.

<cfexchangeConnection
action="open"
username ="domain\username"
password="mypwd"
server="ip of exchange server"
protocol="https"
connection="testconn1">

 connecting to owa isn't the way to do it. You will also have to import the exchange certificate into cacerts.
Brijesh ChauhanStaff IT EngineerCommented:
You need to ensure the following

   Ensure that IIS is configured for access to the Exchange server

    Enabling Outlook web access

    Check and grant web access

    Enabling HTTPS access to the Exchange server

    Enabling SSL on the Exchange server system

    Enabling HTTPS access on the ColdFusion server


http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec14f31-7fed.html

Then you can do

<cfexchangeConnection 
    action = "open" 
    username = "#user1#" 
    password = "#password1#" 
    server = "#exchangeServerIP#" 
    connection = "conn1"> 
 
<cfexchangemail action = "get" name = "spamMail" connection = "conn1"> 
    <cfexchangefilter name = "fromID" value = "spamsource.com">  
</cfexchangemail> 
 
<cfloop query="spamMail"> 
    <cfexchangemail action = "delete" connection = "conn1" 
            uid = "#spamMail.uid#"> 
</cfloop> 
 
<cfexchangeConnection 
    action = "close" 
    connection = "conn1">

Open in new window

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
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
ColdFusion Language

From novice to tech pro — start learning today.