Reading Oulook emails from ASP

N

navin

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top