It is indicated that Mishloach manot are given in order to foster love and friendship. This is to counter what Haman stated about the Jewish people, when he said that they are a divided nation. (Manot Halevi by Rabbi Shlomo Alkabetz, zt"l)
Yoni and David were more than just neighbors. Their small-town community served as a fitting backdrop for the close friendship that had blossomed between them. The other locals knew that if Yoni was around, David wasn’t far behind, and vice versa.
The change was subtle at first, but it didn’t take long for David and Yoni’s neighbors to notice something strange. In the past, as soon as Maariv was over, David and Yoni would sit down and learn together. Now, immediately after Maariv ended, both David and Yoni would put away their siddurim and rush out the door, as if they each had some urgent business to tend to. But it was more than that. Any time someone mentioned David’s name, Yoni would bristle. And if David heard Yoni’s name, he would immediately change the topic.
Months passed, with no indication of any change for the better. Chaim, a mutual friend of the mutual enemies, was greatly pained at the loss of such a close friendship. Chaim looked at his calendar. Purim was coming. And maybe, just maybe, now was the time to act.
Purim day, Chaim hurried home after the megilla reading. He straightened the note cards on the two elaborately wrapped gift baskets that sat on his dining room table. Ten minutes later, there was a knock on David’s door. When David went to open the door, he found a beautiful Mishloach manot package on his doorstep. He held the attached card in his hand, as his breath caught in his throat. I’m so sorry about what happened, David. I wish we could be friends again. -Yoni
Several doors down, the scene repeated itself, as Yoni found the Mishloach manot which had been discretely delivered to his doorstep. "I had no idea that David cared about our friendship. I really do miss spending time with him" Yoni thought to himself.
Was Chaim allowed to send mishloach manot to Yoni and David, as if the two former friends had sent packages to each other?
Answer of Rabbi Avigdor Nebenzal, shlita:
Chaim is a great tzadik (righteous person), and he acted in the way of Aharon the Kohen. The midrash relates that Aharon would bring peace between people. When Aharon heard that people were fighting with each other, Aharon would go to each of the parties and say "I was just at your friend’s house, and he told me how pained he is about what he did to you. He’s very sorry and wants to be friends with you again. In this way, Aharon would cause the two to make peace with each other and become friends again. (Avos D’Rabi Natan, 12, 3)
Chaim acted in accordance with the way of Aharon the Kohen, and his actions are good and just in the eyes of Hashem. Similarly, the Gemara states that it permitted to deviate from the truth for the sake of peace. [We see this in the Torah, in the incident in which Sarah was informed by angels disguised as travelers that she would have a baby.] Sara laughed and said "how will I give birth, and my master Avraham is old!" Hashem changed her words, and said to Avraham that Sarah said "how will I give birth, and I am old." (Yevamot 65)
In summary: Chaim did a great mitzva and acted in accordance with the way of Aharon the Kohen.