Since Japanese are very strict when they are useing formal language toward either someone older than them, their boss, teacher etc therefore it is important to know how to write formally. Formal language in Japanese is called 敬語(keigo) which kei stands for respect.
For the very basic, remember to always say/write 'please', 'thank you very much' which shows your maner and respect to that person.
Please - お願いします (onegaishimasu)
Thank you - ありがとう(arigatou)
Thank you very much - ありがとうごじゃいます (arigatou gozaimasu)
Now, you should realise that the word 'ます' (masu) has been used a few times and it is usually the basic word to differ informal and formal language in Japanese at a very easy level.
I may add different formal language terminology for different daily situation afterwards.