I used this code all around my projects and it works fine:
mail("email@example.com", "Subject", "message");
Now, I´m developing on php and if I use this code, the message is not sent, but it works correctly from the terminal.
Am I missing something?
I send the mail from the terminal like this:
echo "Test email" | mail -s "My Subject" firstname.lastname@example.org