It is well-known in the books of hadith that the Prophet ﷺ wrote to various kings and leaders and the message was binding upon them.
Imam Abdullah al-Mawsili (d. 783 AH) says:
“Writing is from the allusive statements. So if someone writes the divorce of his wife in a letter, board, wall, or the ground then it won’t occur without intention.”
Allamah Ibn Abidin (d. 1252 AH) quotes:
“Intention is not needed for a letter that is clear and addressed and he is not believed in a court scenario that he meant testing handwriting [Bahr]. And the understanding of it is that he is believed religiously for a letter that is addressed [Rahmati].”
Qadi Abdul Wahhab (d. 422 AH) says:
“ Query: If someone writes the divorce with his hand and intended divorce by it, then it is divorce and al-Shafi’i said in one of his two statements that it isn’t divorce. Our proof is that writing is analogous to word coining, that which is in the mind is expressed by it, so divorce can occur with it just like the utterance, it is letters that inform of intent, it is an act of the limb that divorce is understood from just like speech, and writing is called ‘speech’ in relation to an absent person.”
Shaykh al-Azhar Muhammad bin Abdullah al-Kharashi (d. 1101 AH) says:
“If the husband writes to his wife or to someone else, that he divorced her and he intended it, then the divorce occurs merely with his completion of the writing and his writing of the wording of divorce is put in place of him addressing her with it regardless if the divorce has, ‘When my message comes to you then you are divorced’ or ‘You are divorced’ and regardless whether he takes it out (of his hand) and it reaches her or he doesn’t take it out.”
Shaykh Abu Ishaq al-Shirazi (d. 476 AH) says:
“If someone writes the divorce of his wife with an explicit statement and he didn’t intend to, then the divorce does not occur because writing bears the possibility of causing divorce to occur and it bears the possibility of testing handwriting so divorce does not occur with its mere writing. If he did intend divorce by it then there are two positions: It says in ‘Al-Imla’ that divorce does not occur by it because it is an act from someone who is able to speak, thus divorce does not occur by it like pointing. It says in ‘Al-Umm’ that it is divorce and it is correct because they are letters that divorce is understood from so divorce can occur with them just like speaking.
If we go with this stance does the divorce occur by it from the one who is present and the one who is absent? There are two aspects: One is that it does not occur by it except in relation to the one who is absent because it was made customarily for the instructing of the absent person just like pointing/indicating was made for the instructing of the mute person, then divorce by pointing does not occur except in relation to the mute person so likewise, divorce by writing does not occur except in relation to the absent person. The second one is that it occurs by it from all of them because it is an allegorical statement so the one who is present and the one who is absent are equal like the rest of allegorical statements.”
Shaykh al-Islam Ibn Qudamah al-Maqdisi (d. 620 AH) says:
“If someone writes a divorce, and if he intends it then his wife is divorced. Al-Sha’bi, al-Nakha’i, al-Zuhri, al-Hakam, Abu Hanifah, and Malik also said this, and it is the recorded position from al-Shafi’i.”
“Our proof is that writing is letters that divorce can be understood from, so if divorce comes in its form, it is understood from it, and he intended it, then it occurs just like speech because writing takes the place of divorce with the evidence that the Prophet ﷺ was commanded to preach his message and it happened in relation to some by speech and others by writing to kings of various regions. Also, because the letter of a judge takes the place of his speech in verifying records and rights.
As for if the case was that he wrote it without any intention, then Abu al-Khattab said, ‘Qadi al-Sharif explained it in al-Irshad according to two narrations: One of them is that it occurs, this is the stance of al-Sha’bi, al-Nakha’i, al-Zuhri, and al-Hakam because of what we mentioned and the second is that it does not occur except with intention, this is the stance of Abu Hanifah, Malik, and the recorded position of al-Shafi’i because writing bears possibility testing a pen, perfecting handwriting, or upsetting the wife could be intended by it without any intention like allegorical statements of divorce… If he claims this then he is believed religiously for that which is between him and Allah almighty and it is accepted in a court scenario according to the soundest of the two positions.”
Imam Abu al-Hasan al-Mardawi (d. 885 AH) says:
“If someone writes an explicit statement of divorce and intends divorce by it then it occurs according to the correct stance from the school and the majority of the companions (of Imam Ahmad) hold this stance. In al-Hidayah, al-Mudhhab, al-Mustaw’ib and others, it says that it occurs, there is only one narration (from Imam Ahmad). The author (al-Maqdisi) was certain of it, the author of al-Khulasah, the author of al-Wajiz and others because it is either explicit or allegorical and he intended divorce by it.”
The conclusion is that written divorce will count if the husband intends it.
Answered by Shaykh Bilal Brown
 (See: Al-Bukhari, 7 and Muslim, 1774).
 (Al-Ikhtiyar, Chapter of Allusive Statements of Divorce [2/163]).
 (Radd al-Muhtar, Query of Divorce by Writing [2/428]).
 (Al-Ishraf ala Nukat Masa’il al-Khilaf, Chapter of Divorce).
 (Sharh al-Kabir ala matn Khalil, Section on the Pillars of Divorce [4/49]).
 (Al-Muhadhdhab, Chapter on What Divorce Occurs With [3/13]).
 (Al-Mughni, (6022) Section “Divorce Does not Occur Without the Wording of Divorce Except in two Places [7/486]).
 (Al-Insaf, Chapter of Explicit and Allegorical Statements of Divorce [8/472]).