"Raj gives me mangoes."
Translation:राज मुझे आम देता है।
Both of your answers are good, but I think they're best in combination:
Consider मुझ as 'me', and you have 'Raj me gives mangoes', which is closer than 'I' but still not right.
He needs to give them to me, मुझ को, and you have 'Raj to me gives mangoes', great (ignoring that natural English and natural Hindi differ in grammatical order).
And now it is in the oblique case, and finally मुझ को shortens to मुझे, without change in case or meaning.