API endpoint to wait for the mail queue to drain?

You are mistaken: mail processing is asynchronous and queued, reason why it makes sense to wait for the queue to drain.