John to the seven churches in Asia; grace to you and peace from the one who is and who was and who is coming, and from the seven spirits which are before his throne, and from Jesus Christ, the faithful witness, the firstborn from the dead, and the ruler of the kings of the earth. [Translation by David Mills]The greeting and doxology (vv. 5b-8) introduce Revelation like a letter or epistle, and the benediction in 22:21 closes Revelation like a letter. The letter is from the apostle John to the seven churches in Asia. The seven churches are seven literal churches in the province of Asia, but the number seven also suggests completeness so that all churches should hear and keep the words written by John.
As in many epistles, the greeting introduces major themes which occur in the letter. One such theme is the exodus with the plagues poured out on Egypt. This them is introduced when John says that grace and peace are from the one who is and who was and who is coming. This eternal one is the I AM who intervened on behalf of his people to free them from slavery in Egypt. The I AM has not changed. He still is the one who is and who was and who is coming. He is the faithful, ever present God who even yet intervenes with plagues in the world on behalf of his saints (Revelation 8:6 ff. and 16:1 ff.) and who is coming to dwell with them (Revelation 21:2-4).
Grace and peace are also from the seven spirits which are before his throne. Again, seven represents completeness. The Holy Spirit bestows all gifts which enable God's people to live faithful lives and bear faithful witness to God and his son Jesus Christ (Revelation 11:3 ff.).
Finally, grace and peace are from Jesus Christ. He came to earth as the faithful witness of his Father, and for that witness he suffered and died. Because he was faithful, he became the firstborn from the dead and the ruler of the kings of the earth. This Jesus is a pattern for Christians who will also be raised from the dead and seated with Christ on his throne if they are faithful witnesses in the face of persecution and death.
 Seven is associated with completeness because God completed his work of creation and rested in seven days.