Create each attachment, set its properties, and save it. For detailed information about adding attachments to messages, see Creating a Message Attachment.
Call IMessage::SaveChanges to save the message. At this point it will appear in the contents table of the Inbox.
If you want to save a message intermittantly before having it appear in the contents table of the Inbox, create it instead in a hidden folder such as the root folder of the IPM subtree and then move it to the Inbox.