Hi Jeff,
You may have a test with the steps below.
1) open a new ASP file.
2) Cut and paste the following code in it.
3) Modify the serve r name and Profile name to reflect your own. ( place
where to change is in red and bold )
4) Change the recepient name to your own. ( place where to change is in red
and bold )
5) Save file as testmail.asp
Load file in browser and try it.
------------------------------------CODE
BEGIN----------------------------------
<%@ LANGUAGE="VBSCRIPT" %>
<%
Fetch = Request.Form.Item("Fetch")
if Fetch = "Fetch" then
Set objSession = CreateObject("MAPI.Session")
bstrServer = "YourServerName"
bstrMailbox = "YourProfileName"
bstrProfileInfo = bstrServer + vbLf + bstrMailbox
objSession.Logon , , , false, , true, bstrProfileInfo
' create a message and fill in its properties
Set objMessage = objSession.Outbox.Messages.Add
objMessage.Subject = "test message"
objMessage.Text = "test message"
' create the recipient
Set objOneRecip = objMessage.Recipients.Add
objOneRecip.Name = "YourName" ' example Rohit Puri if I was sending it to
myself
objOneRecip.Resolve ' get MAPI to determine complete e-mail address
' send the message and log off
objMessage.Send showDialog=false
objSession.Logoff
set objSession = nothing
set objMessage = nothing
set objOneRecip = nothing
end if
%>
<html>
<body>
<form action="testmail.asp" method="post" id=form>
<input id="Fetch" name="Fetch" type="submit" value="Fetch">
</p>
</form>
</body>
</html>
Please have a test and let me know the result.
What is the authentication in the IIS you are using, if it is the windows
intergrated authentication, try to change it into basic authentication.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure!
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------[color=blue]
>Content-Class: urn:content-classes:message
>From: "jeff" <jeff.rhoad@infarmbureau.com>
>Sender: "jeff" <jeff.rhoad@infarmbureau.com>
>Subject: Reading the Exchange GAL from asp.net page
>Date: Tue, 7 Oct 2003 12:30:39 -0700
>Lines: 48
>Message-ID: <034d01c38d09$7d6e5270$a401280a@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Thread-Index: AcONCX1uvF5A55y+Rn+WDMBKFVcCQw==
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Newsgroups: microsoft.public.dotnet.general
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:111091
>NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
>X-Tomcat-NG: microsoft.public.dotnet.general
>
>Hi.
>
>I am trying to read addresses from an Exchange 5.5 Global
>Address Book from an asp.net page. When the page executes
>the error "Collaboration Data Objects - [E_FAIL
>(80004005)]]" is generated.
>
>Here is the code:
>
>Dim strProfileInfo As String
> Dim ObjSession As New MAPI.Session
> Dim objAddressListType As New
>MAPI.CdoAddressListTypes
> Dim objAddressList As New Object
> Dim objAddressEntry As New Object
>
> Dim strServer As String = "" - valid server
>name here
> Dim strMailbox As String = "" - valid mailbox
>here
>
>
> strProfileInfo = strServer & vbLf & strMailbox
> ObjSession.Logon(, , False, True, , True,
>strProfileInfo)
>
> objAddressList = ObjSession.GetAddressList
>(objAddressListType.CdoAddressListGAL)
>
> 'list all addresses in the gal
> For Each objAddressEntry In objAddressList
> Response.Write(objAddressEntry.Address())
> Next
>
>The ObjSession.GetAddressList method call is the line
>that generates the error.
>
>We are running Exchange 5.5. I am using CDO version
>1.21. The web server and the exchange server are two
>different machines. The web server, which is my localhost
>for now, is running XP.
>
>I would be thankfull for any help.
>
>Thanks.
>
>Jeff
>
>[/color]