If a person swears that he will not speak to someone, then writes a message to him, there is a difference of opinion among the fuqaha' as to whether he has broken his oath. The Hanafis and Shaafais say that he has not broken his oath.
The Maalikis and Hanbalis are of the view that he has broken his oath; they regard sending messages and letters as coming under the same heading as speaking.
But the more correct view is that writing is not regarded as speaking. However we should examine the intention of the one who swore the oath and the motive that made him swear that oath. If he intended only to prevent himself speaking verbally, then he has not broken his oath. If he intended to prevent all kinds of communication, or if the motive for swearing the oath was that he did not want to communicate at all, then he has broken his oath by writing.
It says in al-Mabsoot (9/23): If he wrote to him or sent a message, he has not broken his oath because we stated that speaking can only be verbal. Do you not see that none of us regards it as permissible to say Allah spoke to me, although His Book and His Messenger have come to us? Rather we say that Allah spoke to Moosa, because he heard His words without any intermediary. End quote.
It says in Kashshaaf al-Qinaa (6/259): If he swears not to speak to anyone, he breaks his oath by speaking to any person, male or female, young or old, sane or insane. If the one who swore the oath writes a letter or sends a message with a messenger, he has broken his oath, because Allah, may He be exalted, says (interpretation of the meaning): It is not given to any human being that Allah should speak to him unless (it be) by Inspiration, or from behind a veil, or (that) He sends a Messenger [ash-Shoora 42:51]. And Aa'ishah said: What is between the covers of the Mushaf is the words of Allah. And because this a means of communicating with people, so it is like speaking. However, it says in ash-Sharh wa'l-Mubdi: The correct view is that this is not speech. But if he intended not to communicate with him or if the reason for his oath was the intention to shun him, then he has broken his oath, unless the one who swore the oath intended not to speak verbally to him, in which case he has not broken his oath by writing or sending a message. End quote.
See: Mawaahib al-Jaleel, 3/299; Mughni al-Muhtaaj, 6/218
If she did not break her oath and there was something good to be attained by speaking to this woman, then she should speak to her and offer expiation for breaking her oath, because of the hadeeth of Abd ar-Rahmaan ibn Samurah (may Allah be pleased with him) who said: The Messenger of Allah (blessings and peace of Allah be upon him) said: If you swear to do something then see that something else is better than it, then do that which is better and offer expiation for your oath.
Narrated by al-Bukhaari, 6343; Muslim, 1652
It was narrated that Abu Hurayrah (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: Whoever swears an oath then sees that something else is better than it, let him do that and offer expiation for his oath.
Narrated by Muslim, 1650
But if the oath was broken by writing to her - according to the details discussed above - then she is no longer bound by her oath and she may speak to her, but she has to offer expiation for breaking her oath.
And Allah knows best.
Reproduced from Islam QA