Flush mail on error