Bob mailed a letter to Altan. The letter is the direct object, and Altan is the indirect object. If the direct object is affected by the verb, that means the indirect object is affected by the direct object. It receives the action of the direct object.
Joe wrote to Altan. Altan becomes the direct object of “wrote” and is no longer the indirect object.
No objects are needed in any sentence. For example, the shortest verse in the Bible is, “Jesus wept.” He wept when He heard that his friend, Lazarus, had died. There are no objects in the sentence.