Solved

CDO and MAPI

Posted on 2002-04-16
10
409 Views
Last Modified: 2010-05-02
Couple of easy questions for anyone who has ever used cdo before.

I want offer the ability for the user to email information relevent and generated by my app from within my application.  No UI is necessary except for an email button of course.

I was directed towards MAPI which I automatically saw as a big list of standard DLLs that I would prefer not to touch if I can avoid it.

1) Can CDO do everything I want?
2) Will CDO work on any mail client and operating system that MAPI will work on?
3) I have 3 references to CDO one is "Microsoft CDO 1.21 Library" then there is one for NT and another for Win 2000.  I am running win 2000 but I want this to work on any machine.  For now I have chosen the first one.  Is this correct?
0
Comment
Question by:Lisp
  • 7
  • 3
10 Comments
 

Author Comment

by:Lisp
ID: 6946295
Looks like I can only use CDO for Outlook.  I need something that will work with outlook express and any other mail client the user may have.
0
 

Author Comment

by:Lisp
ID: 6946379
I tried using the MAPI API calls and got exactly the same error message.  It says:

"Either there is no default mail client or the default mail client cannot fulfill the messaging request.  Please run microsoft outlook and set it as the default mail client."

Any ideas?
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 6946457
when I need mailing features in an app, I use vbSendMail since a long time now: http://www.freevbcode.com/ShowCode.Asp?ID=109
0
 

Author Comment

by:Lisp
ID: 6946496
My company frowns on us using 3rd party components.  I have been instructed to use MAPI but I can't get past this error message.
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 6946506
even if this 3rd party is free and you have all the source code?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Lisp
ID: 6946511
This question is changing course.

Why do I get this message:

"Either there is no default mail client or the default mail client cannot fulfill the messaging request.
 Please run microsoft outlook and set it as the default mail client."


When I attempt to log on using cdo and MAPI.

Code used to log on in CDO is this:
    Dim m As New MAPI.session
    m.LogOn
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 300 total points
ID: 6946534
Like I already said, I always use vbSendMail and I have no experiments with CDO.

using the MAPI will require you to get Windows messaging/Outlook properly configured. I don't like this requirement because many of my users have Notes and Eudaora as their e-mail reader.
0
 

Author Comment

by:Lisp
ID: 6946538
So MAPI doesn't work with Eudora or Notes?
0
 

Author Comment

by:Lisp
ID: 6946557
I would rather configure the client's outlook/express (for the few clients who have notes or eudora) for emailing than have to find out what each client's smtp server address is.  Most of the time we are installing to the machine of a person who knows nothing about such things and its a huge pain to find the tech staff member who knows what s/he is talking about.

I still think MAPI is the best option.  Even if it were not, I have to write this thing the way I was asked to.
0
 

Author Comment

by:Lisp
ID: 6946707
You answered my question perfectly even though it wasn't really the answer I was looking for.  I can't really hold the fact that my question was badly researched against you so the points are yours.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now