The email sent by Mr Hayes to Mr McCully on April 20 last year was leaked to TV3 by a source calling himself Yuri Petrov.
He claims he was the hacker of Mr McCully's private emails last year, not the international hacking group Anonymous as widely reported.
Prime Minister John Key has previously confirmed that Mr McCully's emails were hacked, but this is the first time an email has surfaced.
The email is written after a trip to New Caledonia to attend on Mr McCully's behalf a meeting of the Secretariat of Pacific Community, and after leading a business mission to Papua New Guinea.
Mr Hayes is now Mr McCully's parliamentary assistant but served for many years in the Pacific division of the ministry, including a stint as High Commissioner to Papua New Guinea.
"I saw evidence on mindless wasteful admin crap from Wellington and am in no doubt insufficient financial delegation is given to [heads of mission]," Mr Hayes wrote. "JA [John Allen] does not have the system humming as I expect he would have had."
Mr Hayes advises Mr McCully to look at the ministry phone book to see who is doing what - "for example there are 37 positions in the knowledge services division; 105 in information and comms technology division, and 48 in the human resources division and 23 [full-time equivalents] in the communications division. All back office."
On NZ spending in the Pacific, he writes: "Your judgment is correct that the region gets precious little outcome for the expenditure of $145 million."
He said 176 people had attended a meeting he had recently been to of the Secretariat of the Pacific Community in New Caledonia "which cost $250,000 to hold for almost no result".
He also mentions "some outfit we are supporting under NZ Aid flew a person to Noumea to give a 12-minute presentation".
Mr Hayes' email discusses his successful trip to Papua New Guinea and alludes to the fact that Peter Kiely - a National Party stalwart and chairman of the Pacific Co-operation Foundation - also found it wonderful.
But he found it odd New Zealand had seven staff in PNG running a $28 million aid programme "yet no trade commissioner in this market which has huge commercial opportunity".