goltoof Posted June 16, 2010 Share Posted June 16, 2010 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 ("[email protected]","Test subject",$txt); ?> 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? Please help. Quote Link to comment https://forums.phpfreaks.com/topic/204962-mail-scripts-wont-work/ Share on other sites More sharing options...
ram4nd Posted June 16, 2010 Share Posted June 16, 2010 Try setting header, look into smtp, go see how joomla does it or use a framework like codeigniter. Quote Link to comment https://forums.phpfreaks.com/topic/204962-mail-scripts-wont-work/#findComment-1073065 Share on other sites More sharing options...
goltoof Posted June 16, 2010 Author Share Posted June 16, 2010 Try setting header, look into smtp, go see how joomla does it or use a framework like codeigniter. Which is what I've been doing, and has led me on a wild goose chase. I was looking more for something like "these are the abc's to get the mail to send based on your configuration", I'm a little sick of all this reverse engineering for something so blatantly simple. Quote Link to comment https://forums.phpfreaks.com/topic/204962-mail-scripts-wont-work/#findComment-1073068 Share on other sites More sharing options...
ram4nd Posted June 16, 2010 Share Posted June 16, 2010 welll the command is right, then it's about settings Quote Link to comment https://forums.phpfreaks.com/topic/204962-mail-scripts-wont-work/#findComment-1073075 Share on other sites More sharing options...
PFMaBiSmAd Posted June 16, 2010 Share Posted June 16, 2010 A) At a minimum you need to provide a From: email address (there's no guarantee that a valid default from address is setup in the php.ini.) B) Have you examined your Joomla mail settings to see if there are any special requirements, such as SMTP authentication. C) Have you examined your web host FAQ section to see when method to use or if there are any special requirements to use the mail server? Quote Link to comment https://forums.phpfreaks.com/topic/204962-mail-scripts-wont-work/#findComment-1073077 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.