Sending Mail from ASP using CDO.dll (outlook 98) 
Author Message
 Sending Mail from ASP using CDO.dll (outlook 98)

I'm having problems sending mail out using the CDO.dll (MAPI.Session
object).  Although I can code this fine in VB and run it, the ASP never
works.  I keep getting a failure to log in.  I have looked at the examples
on MSDN and even tried them, but they all fail as well.  The failure is
like: E_I_INVALID_LOGIN.

code:
    dim objSession, bstrProfile
    bstrProfile = server & vbLF & userAlias
    set objSession = Server.CreateObject ("MAPI.Session")
    objSession.Logon "", "", False, True, 0, True, bstrProfile   ' this
doesn't cause the error.

    dim msg
    set msg = objSession.Outbox.Messages.Add  ' this generates the error

Anyone have any ideas?  I've tried several things (reference the ProgID as
"MAPI.Session.1", put an OBJECT tag in Global asa using the PROGID, OBJECT
tag with CLASSID, giving a profile name and password).  I know the call
should work as this is how every example in MSDN is done.  Is this something
that is unique to Outlook 98?  That is the only thing that I would have
installed that the examples from MSDN would not have taken in to account.

Thanks for the help.

Fred Zelhart
The Lemke Group



Tue, 07 Nov 2000 03:00:00 GMT  
 Sending Mail from ASP using CDO.dll (outlook 98)

You may be able to use it in VB because you added a reference to your
project, but not in VBScript because you have an earlier version of Active
Messaging registered. Try running "regsvr32 cdo.dll" from a command line,
while in the windows\system directory (95) or winnt\system32 directory (NT).


Quote:
>I'm having problems sending mail out using the CDO.dll (MAPI.Session
>object).  Although I can code this fine in VB and run it, the ASP never
>works.  I keep getting a failure to log in.  I have looked at the examples
>on MSDN and even tried them, but they all fail as well.  The failure is
>like: E_I_INVALID_LOGIN.



Sat, 18 Nov 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using Outlook 97/98 to send mail

2. Sending mail from .asp page using Outlook express object

3. Send Mail using CDO or MAPI without using a profile

4. Trouble trying to send e-mail using CDO

5. ASP & CDO - problem sending SMTP mail

6. How to send E-mail from ASP with CDO

7. wsh/asp to send mail with cdo

8. send mail using CDO.message class with attachment

9. Difference between CDO and Outlook 98 Type Libraries?

10. Sending mail without using MS Outlook or other mail client

11. I need to display e-mail before send using CDO

12. Send Mail using CDO

 

 
Powered by phpBB® Forum Software