Inland Revenue says it wrongly sent emails to 47 people because its computer software scrambled the "to" and "from" address lines.
The error prompted the department to shut down all inbound emails, delaying more than 22,000 messages while an investigation was carried out.
It was initially feared the blunder was the result of a cyber attack but that had been ruled out, Acting Inland Revenue Commissioner Mike Hewetson said.
Mr Hewetson said it was also not due to human error.
"The software corruption resulted in a unique situation where the 'to' and 'from' address lines for a group of emails were scrambled. As a result, 47 people outside of the organisation incorrectly received an overall total of 182 emails," he said.