Shaykh Sulaymaan Ar-Ruhaylee was asked:
From the questions, and this question reminds me of something which is well known with the People of Knowledge; however, it is a lot nowadays. If someone writes me a message, even on the cellphone nowadays, either a textual letter/message or on Whatsapp or such and such form, and this person gives me the greeting of peace, is it obligatory upon me to reply to his greeting?
“Yes, it is obligatory to reply to his greeting. Alright, how do I reply to his greeting? It is obligatory to reply verbally. If a message comes to me, even on the cellphone saying: Assalamu Alaykum. I say: Alaykum us-Salam. If it says: Assalamu Alaykum wa rahmatulllah, then I say: Alaykum us-Salam wa Rahmatullah or I increase saying: wa Barakatuhu
It is recommended to write the reply to him. It is a recommendation of completion according to the stronger statements of the Scholars. He writes a message to him saying: Alaykum us-Salam wa rahmatullahi wa barakatuhu for example. Yes, some of the People of Knowledge made it obligatory, however, this position is questionable. From completion is to write the greeting and what is obligatory is to reply. This [benefit] is in need nowadays a lot when messages reach us on the cellphones, which have the salam written on them. It is obligatory to reply. Some people think that as long as he has not heard it, then it does not need to be replied to. No, as long as a person has given you the greetings and the greetings have reached you, then say as an obligation “Assalamu Alaykum”. If you write it to him, then this is completion. Yes”
Faisal Ibn Abdul Qaadir Ibn Hassan