Getting accepted into college can be a dream come true. But the process turned into a nightmare for thousands of applicants at one New York university.

Last week, more than 5,000 students were sent acceptance letters from the State University of New York at Buffalo, even though they weren't actually approved.

The school said the mix-up happened because "an incorrect email list was generated from an applicant database."

Margaret Hamilton of the Bronx said her daughter was incredibly disappointed when she got an email that said her acceptance letter was just a misunderstanding.

"To say, 'Oh, it's a mistake,' that's like winning the lottery, then getting a letter saying, 'Wrong ticket,'" Hamilton told Buffalo News.

But it could always be worse. In 2009, the University of California, San Diego sent 28,000 acceptance emails to students who had actually been rejected.

At least for the SUNY Buffalo applicants, they still have a chance at getting in. The school said students who were mistakenly emailed are still being considered for admission.

But the school received over 25,000 applications and plans to admit fewer than 4,000 students. So, statistically, most of the applicants are going to end up severely disappointed by the school — again.

This video includes clips from University at Buffalo and images from UC San Diego Publications and JimsFlicker / CC BY 2.0.