Answer: The direct object of the sentence is (a long) letter.
Step-by-step explanation: The direct object of a sentence is the noun, pronoun or noun phrase that acts as the recipient of the action denoted by the verb. However, a direct object can only be present when there is a transitive verb. In the sentence provided, the transitive verb is "wrote" and the action denoted by this verb is received by the noun phrase "a long letter". In that way, the direct object of the sentence is "(a long) letter".