I've been tearing my hair out for 3 days now over something that some 12 year old could probably do in 10 minutes in his sleep. My Joomla site sends mail just fine, but I can't even get the simplest php script to send mail. By simplest I mean <?php $txt = "Some text"; mail ("my@email.com","Test subject",$txt); ?> Code (markup): I'm using Ubuntu server, sendmail is all configured. Joomla sends just fine, I'm trying to send from a simple form on a webpage outside of Joomla which brings me to believe that there's something I'm not including in the script that it needs to work. Can you break down each thing that I should check on the server and each thing I should include in the script to just make it work?
Perhaps the reason why it doesn't work is simply because it's too simple. The email provider that you're using to receive the mail probably discards your mail because it doesn't contain basic headers such as the 'from' header. I suggest you refer to php.net/mail and look at the examples. You should also look at Joomla's code to see how they do it.