access to messages in a public folder with cdo and asp. 
Author Message
 access to messages in a public folder with cdo and asp.

hi all !

here's the code to access to messages in a public folder with cdo and asp.
can someone tell me what's wrong ?
thanks

___________________________________________________
<HTML>
<HEAD>
<TITLE>CDO Access Public Folders</TITLE>
</HEAD>
<BODY>
<FONT face="Arial Black" size=3>Accs un document HTML contenu dans un
dossier public via ASP</FONT>
</P>

<%
'Access to the public folder "Test gmo"
'strMyPublicRootID = folderID of the public folder

CONST strServer = "s99t03"

Dim strProfileInfo
Dim objSession
Dim strMyPublicRootID
Dim objMyFolder
Dim objMessages
Dim objMsg

strProfileInfo = strServer & vblf &
Right(Request.ServerVariables("LOGON_USER"),8)

Set objSession = server.CreateObject("MAPI.Session")
objSession.Logon , , , False, , True, strProfileInfo

strMyPublicFolderID =
"000000001A447390AA6611CD9BC800AA002FC45A030084B86CF6D00DD3118D8A00105ABDCC9
50000000061BB0000"

Set objMyFolder = objSession.GetFolder(strMyPublicFolderID)

Set objMessages = objMyFolder.Messages

For Each objMsg in objMessages
  Response.Write("objMsg.Subject = " & objMsg.Subject)
  Response.Write(" objMsg.Text = " & objMsg.Text & "<BR>")
Next

Set objMsg = Nothing
Set objMessages = Nothing
Set objMyFolder = Nothing
objSession.Logoff
Set objSession = Nothing
%>

</BODY>
</HTML>

___________________________________________________

Laurent BERARD

      Service RGT - Etudes et Dveloppement Groupware
      tl : 02 99 29 71 73 - fax : 02 99 29 71 23
      GIE CIBAMA
      Parc des Perrires - Rte de Chavagne BP41
      35 310 Mordelles - FRANCE
_______________________________________________



Mon, 07 Jan 2002 03:00:00 GMT  
 access to messages in a public folder with cdo and asp.

Quote:
> strProfileInfo = strServer & vblf &
> Right(Request.ServerVariables("LOGON_USER"),8)

Have you confirmed that LOGON_USER is non-blank?  The site must use
authentication...

I also assume the above is all on one line and just wrapped in the post.

It would help if you said something about where and how it fails...

--
Michael Harris


| hi all !
|
| here's the code to access to messages in a public folder with cdo and asp.
| can someone tell me what's wrong ?
| thanks
|
| ___________________________________________________
| <HTML>
| <HEAD>
| <TITLE>CDO Access Public Folders</TITLE>
| </HEAD>
| <BODY>
| <FONT face="Arial Black" size=3>Accs un document HTML contenu dans un
| dossier public via ASP</FONT>
| </P>
|
| <%
| 'Access to the public folder "Test gmo"
| 'strMyPublicRootID = folderID of the public folder
|
| CONST strServer = "s99t03"
|
| Dim strProfileInfo
| Dim objSession
| Dim strMyPublicRootID
| Dim objMyFolder
| Dim objMessages
| Dim objMsg
|
| strProfileInfo = strServer & vblf &
| Right(Request.ServerVariables("LOGON_USER"),8)
|
| Set objSession = server.CreateObject("MAPI.Session")
| objSession.Logon , , , False, , True, strProfileInfo
|
| strMyPublicFolderID =
|
"000000001A447390AA6611CD9BC800AA002FC45A030084B86CF6D00DD3118D8A00105ABDCC9
| 50000000061BB0000"
|
| Set objMyFolder = objSession.GetFolder(strMyPublicFolderID)
|
| Set objMessages = objMyFolder.Messages
|
| For Each objMsg in objMessages
|   Response.Write("objMsg.Subject = " & objMsg.Subject)
|   Response.Write(" objMsg.Text = " & objMsg.Text & "<BR>")
| Next
|
| Set objMsg = Nothing
| Set objMessages = Nothing
| Set objMyFolder = Nothing
| objSession.Logoff
| Set objSession = Nothing
| %>
|
| </BODY>
| </HTML>
|
| ___________________________________________________
|
| Laurent BERARD

|       Service RGT - Etudes et Dveloppement Groupware
|       tl : 02 99 29 71 73 - fax : 02 99 29 71 23
|       GIE CIBAMA
|       Parc des Perrires - Rte de Chavagne BP41
|       35 310 Mordelles - FRANCE
| _______________________________________________
|
|
|
|
|



Mon, 07 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. access to messages in a public folder with cdo and asp

2. CDO Problem using the GetMessage method to find a message in a Public Folder

3. proplem accessing public folders via CDO

4. proplem accessing public folders via CDO

5. Accessing Personal and Public folders via CDO object

6. Accessing attachments to messages in public folder using VB

7. using VBscript to access Access database in public folder

8. Post to a specific Public Folder using CDO

9. CDO hitting Public Folders

10. CDO InfoStore Public Folders can not see Fields Collection

11. Posting to a Public Folder using CDO

12. saving contacts to Public folders using CDO

 

 
Powered by phpBB® Forum Software