You have not provided enough information for anyone to even guess at what the problem might be. Please edit your question and describe your current configuration in more detail (you may obfuscate sensitive information like hostnames or credentials, of course).
If you configured the server to use local mail: what is the local mail server you're using, and how is it configured?
If you configured sending mail via SMTP: what settings did you configure (again: you may obfuscate hostnames and credentials, but nothing else), and can you manually access the SMTP server from the web server using those parameters?