ballhogjoni Posted April 18, 2008 Share Posted April 18, 2008 I am running a windows sever and I am getting the following message: Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in D:\Inetpub\wwwroot\xxxxxxxx\DailyReminder\dailyreminder.php on line 10 I know there is nothing wrong with my code, becasue I can run it on my apache server just fine with no problems. Does anyone know how to fix this on a windows server? Just in case, heres my code: <?php $email = $_REQUEST['email']; $date = date("Y-m-d"); $name = $_REQUEST['name']; if (empty($_REQUEST['email']) || empty($_REQUEST['name'])) { echo "<html><head><title>Error</title></head><body>YOU ARE TRYING TO ACCESS THIS PAGE INCORRECTLY<br>Or, you have not filled out the previous page correctly - please go back.</body></html>"; } else { $admin_email = 'sales@xxxxxxxxxxxxxxxx; $header = "MIME-Version: 1.0\r\nContent-Type: text/plain; charset=\"UTF-8\"\r\nFrom: xxxxxxxxxxxxx <$admin_email>"; mail($admin_email, "New Subcriber from Daily Reminder Download", "Here are the details:\n\nDate: $date\nEmail: $email\nName: $name", $header); ?> Quote Link to comment Share on other sites More sharing options...
GameYin Posted April 18, 2008 Share Posted April 18, 2008 The $admin_email doesn't have a .com or an ending. Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted April 18, 2008 Author Share Posted April 18, 2008 because I substituted it for xxxxxxxxxxxxxxxxxxxx Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted April 18, 2008 Author Share Posted April 18, 2008 I did some more research on the net and found the solution here: http://drupal.org/node/33967 abour a quarter down the page. Apparently windows doesn't like the usall setup of the mail(). You just have to set it up a little different. Quote Link to comment 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.