In most cases there's no difference, but if used in past tense there's different meaning.
In Lampada's examples, "Я послал другу книгу" - book was sent and this is all we know. We don't know if friend has yet received it.
"Мне друг прислал книгу" - the book came to destination (however, maybe speaker didn't got it from post office yet).