Here's an excerpt I found: http://learnjapaneseonline.info/2016/04/28/avoid-kanji-overload-and-write-japanese-like-a-native/
Similarly, while 言う as a word is more often written in kanji, という in
nominalizing and similar uses is usually written in kana.
These uses are probably somewhat related to the fact that common verbs
attached to other verbs are very often written in kana. So 来る is
common but it is nearly always やってくる, not やって来る；持っていくrather than
Whenever you are in doubt, use Denshi Jisho or Rikaisama (or Rikaichan -kun -tan). All of them flag some words with “uk” or “usually written in kana alone”. If you aren’t sure where to use kanji, simply make sure to write these words in kana.
Personally when I email a friend in Japanese, I don't use the kanji. However, when I email a teacher, I tend to use it because for some reason to me it feels more proper and formal.
But this is my own preference and may not reflect other's tendencies.