Jump to content

[SOLVED] mail() function warning message


ballhogjoni

Recommended Posts

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);
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.