Added mail.onerror() and status.getresults() functions