My understanding of indirect objects is that convey the "to whom" or "for whom" of an action. In English, the indirect object can be used with a preposition (She gave a gift to me), or without (She gave me a gift). In Spanish, when is it proper to use the indirect object (Ella se lo dijo), and when it is proper to use a preposition (Ella lo compró para él), or when is both or either acceptable? ¡Gracias!
There are basically three (and a half) different combinations you can use:
- Explicit indirect object (uses a): Di algo a María
This is used when the indirect object has yet to be introduced, or it would not be clear from context.
- Explicit indirect object (uses a) plus pronoun: Le di algo a María
Identical in meaning to the first. Used when you haven't introduced who you're giving it to yet. Particularly emphatic when it comes in front of the verb, but otherwise it's basically fully interchangeable with the (1) with no real difference in interpretation. If the explicit object is a pronoun (a mí/ti/él…) in which case you must use both.
- Indirect object pronoun: Le di algo
Used when context makes it clear who it is. This will be the default if the indirect object is first or second person (me/te/nos/os), as the lack of ambiguity makes the redundancy automatically emphatic.
- Explicit pseudo-indirect object (uses para): Di algo para María
I label this as pseudo because in Spanish grammar, complements introduced with para, though they often fulfill a similar or even identical function as those with a, are not considered to be true indirect objects mainly because they are incompatible with the redundant pronoun used, and they allow for some things that the true object doesn't (for example, nos hice algo and hice algo a nosotros are considered improper, but hice algo para nosotros is fine). Furthermore, it can coappear with the a (compré algo a María para sus padres), and in such a case only the a complement can be converted to an indirect object pronoun (les compré algo a María doesn't work, but le compré algo para sus padres does).