Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending email using MAPI functions... 1

Status
Not open for further replies.

XPPROGRAMMER

Programmer
Nov 15, 2004
44
US
Hello everyone,

when sending an email with an attachment, is the listed
below MAPI functions reliable, or is there a different
win32 api functions that are more efficient and reliable?
thanks for the kind help.

MAPI functions:
---------------
Mapilogon
Mapisendmail
Mapilogoff

***
 

Why do you ask? Are you finding MAPI unreliable? CDO (Installed on XP by default) is the one that I use.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Mike,

what is CDO? How do you call or invoke CDO on XP?

the reason I am asking is that I would like to send an
email in the standard way -- that is accepted on any windows platform (2k, xp, server 2003). Microsoft's website
said "use MAPI functions only for simple email". Regards.
 
CDO (Collaboration Data Objects).

There are a few ways of sending e-mails. It depends on you requirements.

1. Simple Mapi (does not support HTML tags in the body)
2. Extended Mapi (Does support HTML tags)
3. CMC (Common Messaging Calls) Is a non-platform specific. When it is used on Windows it will access the MAPI properties.
4. MAPI Activex
5. CDO 1.21 - I use to use this. Installed with Outlook 98
6. CDO 2.0 - Now I use this. Install by default on XP
7. CDO 3.0 -
8. Automating Outlook
9. And a few other lesser known ones.
Each of the above meet certain needs. As shown Simple MAPI does not support HTML tags in the body of the message. Once you discover what the toll you are using can do you will find you want more. For example if you only want to send bulk e-mails with no access to the Outlook contact folder and no HTML tags in the body, then Simple MAPI might do it for you. But if you need multiple attachment, a whole webpage embedded in the body of the e-mail, access to Outlook contact list, forcing a read-receipt back etc...Then CDO might do the trick for you.
Here are some references for you to look at.
Introduction to Collaboration Data Objects
The Premier Resource for Microsoft Collaboration Data Objects for CDO 1.21
Simple MAPI
Simple Mapi VB
Many Samples here
Outlook Automation

P.S. One thing you may encouter depending on tool you choose to go with, is the warning message that "Outlook is trying to send an e-mail" that requires the user's confirmation. CDO for one bypasses that. Extended MAPI does not, although there are a few "work arounds".
In closing I wouldn't say that any of the above are more stable than the other, it is a matter of your needs, your setup.

Hope that helps.





Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top