MailGetAttachment
The MailGetAttachment function retrieves an attachment to a mail message.
Syntax
int MailGetAttachment (HANDLE hMail, MailMsg * pmm, MailAtt * pma);
At a Glance
Header file: |
Msgstore.h |
Platforms: |
H/PC |
Versions: |
2.0 and later |
Parameters
- hMail
- Handle to the current mail context. This handle is created by the MailOpen function.
- pmm
- Pointer to the mail message to which the attachment belongs.
- pma
- Pointer to the mail attachment being requested from the message. The caller must specify the uiAttachmentNumber member to identify the attachment for retrieval. If pma is NULL, the function returns the number of attachments to the message.
Return Values
This function returns the number of the retrieved attachment if one was specified, the total count of attachments if none was specified, and -1 if there was an error.