Also, we do not need to extract the attachment unless the key isValid