Setting the Sender using Active Messaging objects in VBScript in Active Server Pages

Setting the Sender using Active Messaging objects in VBScript in Active Server Pages

Post by Scott Northwoo » Thu, 16 Oct 1997 04:00:00



I am writing an email application using Active Messaging objects in VBScript
in Active Server Pages.
My users want to be able to enter whatever sender name they please.
This can evidently be done using Active Messaging objects, since a message
object has a Sender property, which can be set to an Address Entry.
My problem is that I cannot successfully add a sender to an address list as
the user web server user, even though that user has administration group
privileges in the domain that it shares with the mail server.  That is, in
VBScript, the call:
        Set objSenderAddressEntry = objAddressList.AddressEntries.Add
fails with the error message:
        [Active Messaging [E_ACCESSDENIED(80070005)]]
Note that the Add method belongs to the AddressEntries collection (property)
of the AddressList object.

The error message above suggests insufficient privileges.  One attempted
solution, logging in as the administrator, fails to give us access to the
address lists even before the above lines.  That is, the call:
        Set objAddressList = objMAPISession.AddressLists.Item(2)
fails with the error message:
        Subscript out of range: 'objMAPISession.AddressLists.Item'
Changing the subscript to 1 or 0 does not prevent this failure.  I believe
Item(2) gives us the global address list, although I cannot remember.  I do
have a disabled loop in my code to look at the address lists.

Does anyone have any ideas???  I need to deliver ASAP.
Thanks!

 
 
 

Setting the Sender using Active Messaging objects in VBScript in Active Server Pages

Post by Ben » Sat, 18 Oct 1997 04:00:00


I am not that familiar with the exact syntax , but I assume your web server
application requires a profile and thus an exchange account to be able to
send messages. This profile is being used when you logon to your session. In
order to set the senders address to something else as your self, the other
user will need to provide you with the 'send on behalf of' permission. So
your security issue is not on the NT security level but Exchange itself.

Ben


>I am writing an email application using Active Messaging objects in

VBScript

 
 
 

1. Active Messaging and Active Server Pages

Hello everybody ,

I am running IIS 3.0 with Active Server Pages on a NT 4.0 Server
machine.
First I just want to test ASP with Active Messaging with the follwing
code fragment :
<%
dim  bstrProfileInfo
dim MyObj
Set MyObj= Server.CreateObject("MAPI.Session")

bstrProfileInfo = "MyServer" & chr(10) & "MyProfile"
MyObj.Logon "", "", False, True, 0, True, bstrProfileInfo

%>
The logon Method of the Session Object produces the error
MAPI_E_NO_SUPPORT.
It works, when I test the same example within a VB Program on the same
Machine.

Has anyone an idea

THANX
                 Andi G.

2. Restrict sending Multiple recipient e-mails

3. address list in exchange

4. using IMAP can not retrieve folder list

5. Active/active set-up fails to failover

6. What does Exch 5.5 use to resolve To: names? Outlook hangs

7. Storage Limit Warning Message in Active/Active Cluster

8. Read Address Book Properties from Active Server Pages (ASP) Page with VBScript

9. Changing Active Messaging Sender properties