The Qur'an speaks of some people other than prophets who receive inspiration or messages from God; for instance, the mother of Moses, who is told to put Moses in the river; or when the angel Jibra'il appeared to the Virgin Mary.
So in and of itself, receiving a message from God does not classify a person as a prophet in a traditional theological sense.
Sometimes, there is an expectation that prophets, by definition, are those who are supposed to take the message and then instruct others to act on it in a new way (such as to encourage people to board Noah's ark), or may present a revealed scripture; for instance, the Qur'an.
According to Twelver Shi'i hadith, the Imams had access to knowledge transmitted through God through various means, and this enabled them to serve as representatives of the Prophet's teachings, to better explain them according to the times, and to demonstrate their authority after the time of the Prophet (S) to those who doubted them.
However, they never claimed to be prophets and throughout Twelver Shi'i hadith, there is an emphasis that the Prophet Muhammad (S) is the final prophet. Rather, their role was to explicate the teachings of the Prophet (S) in the best and most accurate manner. They also did not provide a new scripture to the people. So they are not classified as prophets.