You can dump the session on the page after the email is sent to make sure all of the values look correct.
The history of the email should be saved in the session, so:
Will give you a lot of information. You can confirm the TO and FROM address are set correctly and that there are no errors in the body by viewing that result.
Another thing you can do is create a simple test script to see if email is working on your server in general using some of the code examples on the php website here:
If you can't send a simple email using those test scripts, then it is likely an issue on the server, so no amount of debugging your code would make a difference.
If you update to DataBridge v2 then you can use a more modern and feature rich email solution. It includes an option to send authenticated SMTP email just like you would through your phone or computer. That is a great way to get around spam filters and not rely on your webserver to send emails and to actually use your existing email server. It also has a debug mode that shows all communication between your SMTP server and website that would help debugging any issues if they did arise.