An error occurred
Turns out mail service was not initialized at all, also mail must be sent in sync in hook mode before program exits.