Sets information about a message attachment. Getting the property value of MAPI_PROP_MSG_ATTACH_COUNT will retrieve the number of recipients. The attachment ID's are 0 based.
Mapi.bdh
MapiSetMessageAttachment( in hMessage : number, in nAttachmentID: number, in sFileName : string, in sFullPath : string ) : boolean;
| Parameter | Description |
|---|---|
| hMessage | Valid MAPI Message Handle. |
| nAttachmentID | ID of the attachment that should be set. This needs to be a value between 0 and MAPI_PROP_MSG_ATTACH_COUNT-1. The ID is 0 based! So - the first attachment has ID 0 - the second one 1, … |
| sFileName | Filename of the attachment. |
| sFullPath | Fullpath of the attachment. |
See MAPI Sample