A JFK Airport security supervisor has been fired for mistakenly sending out a mass e-mail blast — of his genitals — to nearly two dozen shocked underlings, supervisors and Port Authority executives.

The embarrassing incident occurred around 7:15 a.m. June 21 after Gerard Robson, a project manager for private contractor FJC Security, responded to an airport parking-lot fender bender involving a security guard’s car.

Robson had hoped to alert his bosses and PA execs to what happened by taking photos of the cars and e-mailing the images with his company-issued BlackBerry, sources said.

But Robson somehow attached another snapshot stored on the cellphone — showing him inside a car, “waist down, naked penis out, belly and all,” according to one source.

It went out to about 20 individuals, including subordinates, at least two FJC veeps and two PA supervisors, the sources said.

Robson realized his mistake almost immediately.

He rushed off to try to delete the photo from the office computers and cellphones of subordinates, the sources said.

The former New Jersey transit cop also e-mailed an apology, according to what the sources said was a copy of the correspondence.

“Earlier this morning, while I was sending out a notification regarding a Motor Vehicle Accident, I had taken several pictures of the vehicle,’’ the e-mail said.

“In error, I accidentally attached a very inappropriate photo and without realizing the mistake, continued to send out the notification with the photograph attachment.

“Please accept my sincere apology as I am tuly [sic] sorry for my actions.”

But Robson’s apology was too late. PA officials immediately revoked his airport-security credentials and ordered him barred from the premises.

His employer then moved quickly to suspend him before firing him, according to Mike McKeon, an FJC spokesman.

“Who knows? Maybe he’ll run for mayor,” McKeon quipped.

Robson could not be reached for comment.

Stephen Jackson, a former FJC supervisor, called Robson’s firing “karma.’’

Jackson had provided The Post with a series of damning photographs and a videotape showing FJC guards sleeping on duty at JFK Airport. The Post published the images in a front-page story last month.

Jackson says Robson fired him because he wouldn’t keep quiet about that scandal and has since filed a $60 million wrongful-termination lawsuit against FJC. Brian Konoski, Jackson’s lawyer, called news of Robson’s firing “another black eye for FJC.”