After an elementary schoolteacher in Phoenix posted her salary on Facebook in March last year amid a statewide protest for more education funding, she got a lot of calls from the news media, and a lot of hate mail, too.

But a few months later, the teacher, Elisabeth Milich, said she received what seemed to be an unbelievable offer from a stranger in New York City: He would pay for the snacks and supplies she and her husband had been buying for her students with their own money.

“I thought it was a one-time thing,” Ms. Milich said on Thursday.

Instead, the man, Ben Adam, has since supplied her classroom at Whispering Wind Academy with colored pencils, paper clips, books, crackers and big bags of Hershey’s Kisses for two semesters. He has also bought a butterfly farm for another teacher in Phoenix, and supplies for four other classrooms in the Phoenix area.

He started a website last month called Classroom Giving, which allows other people the chance to give necessities to teachers.