Cook offered to resign and this was accepted by the club after it was deemed there was some “foundation" to the allegations.
Cook had denied sending the message and claimed his e-mail account had been hacked.
The club issued a statement confirming the board had accepted Cook's resignation and that chairman Khaldoon Al-Mubarak had apologised to Dr Onuoha.
In the statement, Khaldoon said: "Garry has made a remarkable contribution to Manchester City Football Club over the past three years. His judgement in this matter should in no way lead to his accomplishments being overlooked.
"On every level, the club is unrecognisable from the organisation which he inherited and our staff and supporter services, community outreach and commercial activity have seen unparalleled growth under his direction with yet more projects to be realised on the horizon.
"On behalf of Sheikh Mansour and the Board, I would like to thank him for his energy and tireless commitment to serving all those connected with the football club. He will always be welcome at Manchester City."