MAPI and CDO

xiaoxiao2021-03-06  18

Because the message programming is to be used, the MAPI and CDO are simply simple, using Mapi ActiveX Control to program, Mapi ActiveX Control has two classes (I use C programming), CMAPISESSION and CMAPIMESSAGE, very simple to use . But the bottom layer is still sent to the email like Outlook Express, sometimes the Outlook Expresss sends a mail dialog, it is very unhappy. So starting to search for the underlying programming of MAPI, the MAPI underlying function is very powerful, saying is a COM component, but I see Microsoft's example or use LoadLibrary to load msmapi32.dll, call or ordinary DLL functions, there seems to have not seen the shadow of COM. There are Simple Mapi, Command Messaging Call and CDO above Mapi. CDO is an object-oriented COM component, which is convenient than the underlying layer of Mapi, so there are also many versions of CDO.cdo, starting to call Ole Messaging, then active messaging, now called CDO. There is CDONTS.DLL, for Windows 2000 CDOSYS.DLL, and the CDOEx.dll of For Windows 2000, and CDO for management, workflow. First examine CDOSYS.DLL, write a VB mail sender: SUB CZM () DIM IMSG as new cdo.Messagedim iconf as new cdo.configuration

Dim flds as adodb.fieldsset flds = iconf.fields

WITH FLDS .ITEM (CDOSENDUSINGMETHOD) = cdosendusingport .Item (cdosmtpserver) = "pop.tom.com" .Item (CDoSMTPConnectionTimeout) = 10 'Quick Timeout .Item (CDoSMTPAUThenticate) = cdobasic

'IMPORTANT: Storing user names and passwords inside source code' can lead to security vulnerabilities in your software Do not 'store user names and passwords in your production code .Item (cdoSendUserName) = "zeki" .Item (cdoSendPassword) = ".. Zeki "

.UPDATEEND WITH

转载请注明原文地址:https://www.9cbs.com/read-71584.html

New Post(0)