Error: "There are 965 email jobs that failed. Check your app.yml and ensure that the mail server settings are correct."

Can you log into your server via SSH? If so, try running

ping discourse.org

and see if that works.