One day, she decides to write a letter to someone living in New York City: by pure chance she chooses Max Jerry Horowitz (Philip Seymour Hoffman) from a telephone directory. Max turns out to be a morbidly obese 44-year-old whose various mental problems (including anxiety attacks and overeating) have left him unable to form close bonds with other people. Max decides to write back to Mary, and the two become friends. Over time, Mary's increasingly sensitive questions about the adult world give Max progressively worse anxiety attacks, and he is ultimately institutionalized. During his time there, Max is diagnosed with depression and Asperger syndrome. Now aware of why he has difficulty relating to other people, Max finds a new lease on life and resumes his correspondence with Mary.
The two remain friends for the next two decades, keeping one another updated on various events in their lives. Mary (Toni Colette), inspired by her friendship with Max, becomes a psychologist and marries her childhood crush, an effeminate young Greek Australian man named Damien Popodopoulos (Eric Bana) who enjoys sewing but fears Mary's sexual advances. Max wins the New York lottery, using his winnings to buy a (literal) life-time supply of chocolate and then giving the rest away to his elderly neighbor, who wastes most of it before dying and leaving the remainder to a cat shelter only to have the owner of the shelter