Someone wrote them for him. He dictated it!

I know that the Prophet Muhammad (pbuh) was illiterate. During the conquest of Islam when the Prophet would send letters to the rulers of certain regions, did he write those letters himself or did someone write them for him? For example, when the Prophet sent a letter to the ruler of Bahrain at the time, did he write that letter? Also, did he write the Seal of the Prophet?