Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: MAPI_E_NOT_FOUND(8004010F)


Message #1 by "David" <david.lonjon@n...> on Fri, 8 Feb 2002 11:57:13
Hi guys , I need your help.



I'll explain first the background. I'm part of an organisation with let's 

say 60 people. This organisation is running under a windows 2000 server 

with a web server (IIS5). Let's call it "BART" and let's say i'm the 

administrator of this server. The organisation is also running an exchange 

server (version 5.5). Let's call it "HOMER". Let's say i don't have any 

administrative right on this server. Every member of this organisation has 

a valid computer account and a valid mailbox on the network. 

The boss of this organisation asked me to produce an online form that any 

staff could complete to ask for special leaves. The boss want that once 

the staff submit the form, it sends automatically the data from his 

mailbox to his supervisor mailbox --> It is the important point. So that 

the supervisor can approved the form. The system of form I'm using is 

Acrobat form, but it is not important. 

The online form is located on the intranet. It is hosted on "BART". Once 

the submit button is pressed, it is calling an ASP page located still 

on "BART". The ASP page asks the user to authenticate using the Basic 

authentication from Windows NT so the script look up the LDAP directory 

from the exchange server to find the user mailbox. Finally it logon to the 

user mailbox and send the mail. 



Here is the part of the code which logs into the user mailbox and send the 

mail:



'------------------------------------------------------------------------

'-- Create the MAPI Session object. 

Set objSession = Server.CreateObject("MAPI.Session")



'-- Build Profile from server and mailbox name info

'-- Exchange Server will Dynanically build Profile

bstrProfileInfo = strMailServer + vbLF + strMailBox



'-- Login to the authenticated user mailbox

objSession.Logon "", "", False, True, 0, True, bstrProfileInfo



Set objOutbox = objSession.Outbox

Set objNewMessage = objOutbox.Messages.Add

Set objRecipients = objNewMessage.Recipients

Set objOneRecip = objRecipients.Add

	

With objOneRecip	

      .Name = strMailRecipName		'-- Creation of the recipient

      '.Type = ActMsgTo

      .Resolve '-- Get MAPI to determine complete E-mail address.

End With



With objNewMessage

     .Subject = strMailSubject  '-- Subject of the mail

     .Text =  strMailText	'-- Message of the mail

     Set objAttachment = .Attachments.Add

       	With objAttachment

            .Position = 0	

            .Name = "Admin01.pdf"	'-- Display name of the attachment

            .Type = 1

	    .Source = strTemp		'-- Source of the attachment

            .ReadFromFile strTemp	'-- Attach the file

        End With

	    .Sensitivity = 3

	    .Sent = False

	    .Submitted = False

	    .Unread = True

    	    .Update				'-- Update the message

            .Send(false) '-- Send the Mail without saving it in "save 

items"

    End With



objSession.Logoff

Set objOutbox = Nothing 

Set objNewMessage = Nothing 

Set objRecipients = Nothing 

Set objOneRecip = Nothing 



'-----------------------------------------------------------------------



This is working fine when I logged into the asp page with my username and 

password. I can submit the form, I logged using the BASIC NT 

authentication, my mailbox is found into the LDAP directory, the ASP page 

logon into my mailbox and send the mail.

Once someone else from the organisation tries to do it, the process fails 

at the point when the script tries to logon into the user mailbox. 



The asp page gives out the following erro  message:

'------------------------------------------------------------



#Collaboration Data Objects error '000004f7' 



[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]] 



/Admin01/script/submit_admin01.asp, line 262 



'------------------------------------------------------------



But the user do excatly the same things that i do. He is succesfully 

authenticated by the system, his mailbox his found into the LDAP directory 

but it fails to login to his mailbox. The user is connecting to the ASP 

page from his workstation machine where he is logged with his computer 

account details.



On "BART" it is installed OUTLOOK 2000.



So if you have any idea or suggestion, they are more thant welcome. If you 

wnat more details , please don't hesitate to ask. At some point my 

thinking might be wrong. I'm fairly new using this technology, so I might 

miss a step. Please help.



Thank you.



David


  Return to Index