Jaa


Mapi Class

Definition

The Mapi class enables email to be sent, received, and managed in most major mail systems, such as Microsoft Exchange systems, Microsoft Outlook Express, and Lotus CCMail.

public ref class Mapi : Microsoft::Dynamics::Ax::Xpp::XppObjectBase
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
public class Mapi : Microsoft.Dynamics.Ax.Xpp.XppObjectBase
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
type Mapi = class
    inherit XppObjectBase
Public Class Mapi
Inherits XppObjectBase
Inheritance
Microsoft.Dynamics.AX.KernelInterop.ProxyBase
Mapi
Attributes

Remarks

Together with the other Mapi classes, MapiMessage, MapiRecipDesc, and MapiFileDesc, this class lets you specify multiple recipients, file attachments, message text, and a subject. The easiest approach is to set up a working mail client on the machine, and make sure that this works correctly order by sending and receiving a few email messages. Flags for the Mapi methods are located in the Mapi macro. You include this macro in code where you use the Mapi classes together with the #MAPI statement.

The following example shows how to send an email message by using this class.

static void example() 
{ 
    #Mapi 
    Mapi m = new Mapi(); 
    MapiMessage msg = new MapiMessage(); 
    MapiRecipDesc recip = new MapiRecipDesc(); 
    // Set up the recipient. 
    recip.Name("someone"); 
    recip.RecipClass(#MAPI_TO); 
    msg.setRecipNo(1,recip); 
    // Log on using default profile. 
    m.Logon("","",#MAPI_USE_DEFAULT); 
    // Send the mail, and allow the user to modify the 
    // Subject, Text and Recipients in the Send Mail Dialog. 
    m.SendMail(msg,#MAPI_DIALOG); 
    // Log off. 
    m.Logoff(); 
}

Constructors

Mapi()
Mapi(IntPtr)

Fields

__k_MapiId
kernelClass (Inherited from XppObjectBase)

Methods

__shouldCallNew(Type)
addXppProxyReference(Type, Object) (Inherited from XppObjectBase)
Call(String, Object[], Type[], Object[]) (Inherited from XppObjectBase)
cancelTimeOut(Int32) (Inherited from XppObjectBase)
createKernelClass(Object[], Type[], Object[]) (Inherited from XppObjectBase)
deleteMail(String)

Removes the specified message from the message store.

equal(XppObjectBase) (Inherited from XppObjectBase)
finalize()
findNext()

Finds the first or next message in the message store.

findNext(String, String, Int32)
findNext(String, String)
findNext(String)
GetIntPtr() (Inherited from XppObjectBase)
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getTimeOutTimerHandle() (Inherited from XppObjectBase)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
IsManagedValid() (Inherited from XppObjectBase)
kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
logoff()

Lets you log off the mail system.

logon(String, String, Int32)

Logs on to the mail system by using the specified profile and password.

MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
newmethod()

Initializes an instance of the Mapi class.

notify() (Inherited from XppObjectBase)
notifyAll() (Inherited from XppObjectBase)
objectOnServer()
Obsolete.
(Inherited from XppObjectBase)
readMail(String, Int32)
readMail(String)

Retrieves a message from the message store.

resolveName(String, Int32)

Transforms the message recipient's name, as entered by a user, to an unambiguous address list entry.

saveMail(MapiMessage, Int32, String)

Saves a message to the message store.

sendMail(MapiMessage, Int32)
sendMail(MapiMessage)

Sends a message to the specified recipients.

setTimeOut(String, Int32, Boolean)
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32)
Obsolete.
(Inherited from XppObjectBase)
status()

Retrieves the status of the last Mapi operation.

usageCount() (Inherited from XppObjectBase)
VerifyKernelClass() (Inherited from XppObjectBase)
wait() (Inherited from XppObjectBase)
Xml() (Inherited from XppObjectBase)
Xml(Int32) (Inherited from XppObjectBase)

Applies to