This assumes that the reader isn’t a beginner, & already has a reasonable understanding of direct & indirect object pronouns.
In Spanish, we will use the indirect object pronoun with ‘say’ verbs (& others, but especially ‘say’ verbs) even when the person is mentioned in the sentence. These are also known as ‘redundant pronouns’ because they add no information to the sentence, but Spanish speakers say them anyway!
When we ‘say’ something, & it’s quoted, there’s no need for a direct object pronoun, but we still use the indirect object pronoun for the person.
Jorge said ‘I want to marry you’ to Ana.
Ana = indirect object.
Jorge le dijo a Ana, ‘Quiero casarme contigo’.
If you’re telling something to someone, – reported or ‘indirect’ speech – then you have two ‘objects’ being referred to, so need two pronouns. The someone who is being told – this is the ‘indirect object’, & what is being reported – this is the direct object, because the verb is being done ‘directly’ to it.
Here’s an example:
Jorge told her that he wanted to marry her.
her = indirect object – it’s being told to her
he wanted to marry her – direct object – what is being told.
Jorge se lo dijo a Ana que él quería casarse con ella.