Check for the mail API before calling it.
Ensure we return an array, not an object.