An embarrassing mistake by a university in upstate New York.

FOX's Carmen Roberts reports:

The State University of New York at Buffalo probably wishes it had a 'take-back' email button. The admissions office sent acceptance email letters to 5,000 prospective students last week: One small problem. The students had not been accepted.

Within hours the university sent a second email notifying the students of the blunder and apologizing for it. The university says it accidentally generated the wrong email list for the letters.

Several universities have made this kind of embarrassing mistake including the University of California at San Diego. In 2009 it accidentally sent acceptance letters to 28,000 prospective students who were supposed to get rejection letters.

Carmen Roberts, FOX News.