Ben Leibowitz called up relatives to tell them he got into Carnegie Mellon University's prestigious graduate computer science program. He even went out to dinner with his parents to celebrate.
Then he got a second email saying he hadn't been accepted after all.
About 800 other Carnegie Mellon applicants experienced similar swings of ecstasy and agony Monday - first rejoicing that the Pittsburgh institution had selected them for its master of science in computer science, then being told the acceptances were sent in error and that they had been rejected.
"It was brutal. I didn't get much sleep last night," Leibowitz, of Stamford, Connecticut, said Tuesday. "Now I have to clean up the mess. I'm calling all my relatives, I'm going, `I'm sorry it's not happening.'"
Carnegie Mellon spokesman Kenneth Walters said the "Welcome to Carnegie Mellon!" messages were the result of "serious mistakes" in the university's process for generating acceptance letters and that it would conduct a review to prevent another error.
"We understand the disappointment created by this mistake, and deeply apologize to the applicants for this miscommunication," Walters said.
The university sent a follow-up email to the rejected students Tuesday afternoon, saying its system had "incorrectly flagged" applicants as being admitted.
Dozens of applicants shared snippets of their rejection emails along with hints of their own disappointment on a message board for people applying to graduate programs.
Carnegie Mellon's computer science graduate school tied for No. 1 with Massachusetts Institute of Technology, Stanford and the University of California at Berkeley in U.S. News & World Report's most recent rankings.
The university said in the erroneous messages that it accepts less than 9 percent of more 1,200 applicants - or about 100 people - into the master's program each year.
But all the technological know-how and selectivity in the world couldn't prevent the university from joining the list of high-profile institutions that accepted applicants when they didn't mean to.
In December, Johns Hopkins University mistakenly sent nearly 300 undergraduate applicants welcome messages when they were actually rejected or deferred.
In February 2014, the Massachusetts Institute of Technology sent thousands of students a mistaken email about financial aid saying they were receiving the information because they had been admitted.
In 2009, the University of California at San Diego sent acceptance emails to all 46,000 students who applied, including 28,000 who were rejected.
Elisa Davis, a consultant who helped Leibowitz prepare for the graduate admissions tests, said she'd never heard of erroneous acceptance letters at the graduate school level, in part because the process is much more personal than for undergraduates.
"People need to put care into things that affect other people," Davis said. "I'm very disappointed in them."
© 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.