Kathleen Kelly (Meg Ryan) owns a West Side NY City children's bookstore founded by her mother. Her boyfriend (Greg Kinnear), a writer, is nice enough but her heart is being pulled toward a guy she met in an AOL chat room. They e-mail often but give no details of their lives; hearing the famous "You've got mail" is the highlight of her day.
Joe Fox (Tom Hanks) runs a huge mega chain discount bookstore which is opening a branch across from Kathleen's location. His girlfriend (Parker Posey), a book agent, is a bit annoying, and Joe is increasingly drawn to a woman he met in an AOL chat room.
Joe stops in Kathleen's store while babysitting young relatives, and is smitten with her. He does not reveal that he is her archenemy as the head of the Fox Books. When they meet again at a party and she realizes his Fox connection, she is angry, and further path-crossings elicit more harsh words between them. Meanwhile, they both seek solace with their online partners not realizing that they are pouring their hearts out to each other.
The online correspondents agree to meet, but Joe sees through the window that Kathleen is "ShopGirl" waiting for him, "NY 152". He goes in and speaks with her but doesn't reveal that he is the one she's waiting for. The next day, NY 152/Joe apologizes for standing her up and they continue to grow closer, with Joe now knowing her identity but her still not knowing his. He has great fun with this.
Kathleen's boyfriend finds someone else and they split amicably. Joe recognizes the shallowness of his girlfriend and he moves out.
Fox Books eventually drains the business out of Kathleen's shop and she is forced to close the store. Joe offers a truce and they become unlikely friends, but clearly enjoy each other's company and get together often.
NY152 asks to meet again and ShopGirl accepts. Just before the arranged time, Joe tells Kathleen that he wonders what would have happened if they had met in different circumstances, and she obviously wonders as well. She knows that she has begun to care deeply for Joe, but is eager to meet the one who has been her online comfort for so long.
She arrives at the designated meeting place, sees that it's Joe and tells him she wanted NY152 to be him "so badly" as he kisses her.