Messages in IMAP4 are accessed by the use of numbers. These numbers are either message sequence numbers (relative position from 1 to the number of messages in the mailbox) or unique identifiers (immutable, strictly ascending values assigned to each message, but which are not necessarily contiguous). IMAP4 supports a single server.
See the problem-diagnosing chart in this answer.. Based on that chart, the problem is either a Power Supply failure or a motherboard failure. I would favor a motherboard failure, since you say that the laptop works perfectly well when it boots up successfully, but you could further test this by using stress tests of CPU and GPU, to see if any power problem occurs.