These terms come from Roman Jakobson's model of the functions of language. (Jakobson is the legendary structuralist linguist of whom it was said that he spoke 36 languages, each with a foreign accent.) The model had six functions; the others were emotive, conative (issuing a command), metalingual, and poetic.
The bit about using phatic language mostly with people one doesn't know well is not from Jakobson. I made it up, and it's probably wrong. I didn't go over that sentence 20-50 times :).
It was just that I recently had this thought that language could be divided into a "smalltalk" component, where the content is replaceable but not the conversation partner, and an "info" component, where the partner is replaceable but not the content. I have no clue about linguistics but I vaguely remember that this may correspond to competing theories how language evolved. "Phatic language is about maintaing the connection" seemed to fit perfectly.
But as there are four other components according to Jakobson, I should be careful. Added Jakobson to my reading list.
The bit about using phatic language mostly with people one doesn't know well is not from Jakobson. I made it up, and it's probably wrong. I didn't go over that sentence 20-50 times :).