Fix error in Message Number

The message number identifies a message within a folder. The loop-index is not the correct value.