Bishop Peter Libasci spoke during the special Mass in his honor at Our Lady of the Holy Rosary in Rochester, and read a letter from the Vatican, which extended condolences from Pope Francis.
The Catholic bishop said Foley was trying to set an example by repeatedly going to dangerous places as a reporter.
"Jim went back again that we might open our eyes," Libasci said. "That we might indeed know how precious is this gift. May almighty God grant peace to James and to all our fragile world."
After the service, Foley's family released what they said was a letter they got from him. According to a post on their Facebook page, Foley had tried repeatedly to send them letters, but all were taken by his abductors.
Instead, Foley dictated the letter to an unnamed fellow detainee who was released, and in it he talked about his memories of his family and detailed the conditions of his captivity.
"Eighteen of us have been held together in one cell, which has helped me," Foley said. "We have had each other to have endless long conversations about movies, trivia, sports."
He also described how they invented games from "scraps found in our cell" to help pass the time.
"I have had weak and strong days," Foley said. "We are so grateful when anyone is freed; but of course, yearn for our own freedom. We try to encourage each other and share strength. We are being fed better now and daily. We have tea, occasional coffee. I have regained most of my weight lost last year."
Foley's siblings said last week that other journalists who had been released by their captors told them "heartwarming" stories about their brother, saying that he helped his fellow captives stay "mentally and emotionally strong."
In his letter to his parents, Foley talked about how he wanted his savings distributed. His siblings and family have said they more or less knew Foley was unlikely to survive after the U.S. began bombing ISIS militants in Iraq, which was followed quickly by what they described as a "chilling" email directly from the terrorist group.
Despite what were likely grim prospects for survival, Foley's letter was optimistic and even had a few light-hearted moments.
In signing off on the letter, Foley wrote: "Grammy, please take your medicine, take walks and keep dancing. I plan to take you out to Margarita's when I get home. Stay strong because I am going to need your help to reclaim my life."