ccravens Posted February 22, 2007 Share Posted February 22, 2007 Hello: I am running a Windows machine (yes... I know! ;-) Running apache, php, mysql... all that good stuff. However, when I try and use the mail() function, it fails. I do have an SMTP server running on port 25. Argosoft Mail Server 1.8 to be exact. My php.ini settings are default localhost 25 I have tried multiple SMTP server programs for windows. What else am I missing here that I can't send emails. However, I can send emails when I run a Content Management System such as Joomla. But running a simple mail() call does not work. Any help for this is greatly appreciated! Thank you in advance!! Here is the code example. $to = "[email protected]"; $body = "Test email"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; if(mail($to, $subject, $body, $headers) == false) { header("Location: http://www.we-mall.com/ErrorPage.php"); exit(); } Link to comment https://forums.phpfreaks.com/topic/39589-using-php-mail-in-windows/ Share on other sites More sharing options...
ccravens Posted February 22, 2007 Author Share Posted February 22, 2007 Please note above that I have left out the $subject variable... but it is there in my code, I promise Link to comment https://forums.phpfreaks.com/topic/39589-using-php-mail-in-windows/#findComment-191028 Share on other sites More sharing options...
skali Posted February 22, 2007 Share Posted February 22, 2007 Missing From header could be a problem. Link to comment https://forums.phpfreaks.com/topic/39589-using-php-mail-in-windows/#findComment-191169 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.