MapiMessage.setFileNo Method
Sets a file attachment for the message.
Syntax
public void setFileNo(int fileNo, MapiFileDesc file)
Run On
Called
Parameters
- fileNo
Type: int
The index of the attachment.
- file
Type: MapiFileDesc Class
The MapiFileDesc object that describes the attachment.
Remarks
The attachments are numbered from 1. Therefore, the first attachment should be numbered 1. You can call the numFiles method to retrieve the number of attachments.
Examples
{
MapiMessage msg = new MapiMessage();
MapiFileDesc attachment = new MapiFileDesc();
attachment.Path("C:\\files\\info.txt");
msg.SetFileNo(1,attachment);
}