RNA that encodes and carries information from DNA during transcription to sites of protein synthesis to undergo translation in order to yield a protein.