Reading Oulook emails from ASP

Discussion in 'ASP General' started by navin, Sep 8, 2009.

  1. navin

    navin Guest

    Hello All,

    I need to read emails from outlook through my webpage and retrieve the
    subject line. I am using the below code to do this, but when i test
    this, it just hangs around and does nothing and gives timeout error
    after sometime.

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    </head>

    <%
    Const olFolderInbox = 6
    Dim msgCount

    Set objOutlook = Server.CreateObject("Outlook.Application")
    Set objNamespace = objOutlook.GetNamespace("MAPI")
    Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox)
    Set objUFolder = objFolder.Folders("Oracle POs")

    Set colItems = objUFolder.Items
    Set colFilteredItems = colItems.Restrict("[Subject] = '4918852'")

    For Each objMessage In colFilteredItems

    %>
    <table border="1" width="100%" id="table1">
    <tr>
    <td><%= objMessage.Subject %></td>
    </tr>
    <%
    Next
    %>

    </table>

    Please help and advice on how to read outlook mails? I have searched
    on this topic but did not get any solution.

    Thank you very much for the help..

    Navin
    navin, Sep 8, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Savas Ates

    READING EMAILS

    Savas Ates, Jan 27, 2006, in forum: ASP .Net
    Replies:
    13
    Views:
    3,801
    Steven Nagy
    Jan 31, 2006
  2. The Night Blogger
    Replies:
    1
    Views:
    288
    Gabriel Genellina
    Dec 17, 2006
  3. Cirene
    Replies:
    0
    Views:
    267
    Cirene
    Apr 22, 2008
  4. Guest

    Problem in developing oulook addin

    Guest, Dec 23, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    151
    Guest
    Dec 23, 2004
  5. Guest

    Problem in developing oulook addin

    Guest, Dec 23, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    131
    Guest
    Dec 23, 2004
Loading...

Share This Page