Removing attachments from messages

The messaging framework allows you to remove attachments from messages.


Attachments to a message may be removed.


  1. Get the details of the message to which you want to add an attachment using CMsvEntry::EditStoreL().

    This function returns CMsvStore in writable mode.
  2. Get an MMsvAttachmentManager attachment manager for the message entry, using CMsvStore::AttachmentManagerL().

  3. Remove an attachment using the MMsvAttachmentManager::RemoveAttachmentL() function.
    void CFoo::RemoveAttachL(TInt aNum)
        TRequestStatus status;
        // Remove attachment with index aNum
        attManager.RemoveAttachmentL(aNum, status);
        // Wait for request to complete

Related concepts