Link to home
Start Free TrialLog in
Avatar of prowebinteractive
prowebinteractive

asked on

error with my php mailer on windows server

Im getting this error : Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in \\NAS1\Home\M\MMU757\www\masterMailer\index.php on line 83

on a linux server it works
Avatar of NetExpert
NetExpert

What is your line 83 in index.php file?
Avatar of prowebinteractive

ASKER

$bil = mail($dest, $suj, $lebody, $tope);
I put a this now

@mail($dest, $suj, $lebody, $tope);

I dont get the error anymore but the email is not being sent
I'm going to guess that it's the address to the SMTP server by the error it kicked back.

If this is a Windows 2000 Server do you have your FQDN set?

If you go into System Properties in Win2000 and go to the Network Identification tab, you will see "MACHINE-name." in the full computer name field. You will need to append your full domain name into Win2000. On the Network Identification tab, click the "Properties" button, Then on the Identification Changes page, click the "More" button. On this page add your domain name to the "Primary DNS suffix of this computer" field. After you OK the change, you will be required to reboot.

After reboot, try running the script.  This may or may not fix the error.  If it's still failing, let's look at the SMTP server information.  

Where is your SMTP server?  Is it the same machine? If it isn't the same machine.  Check your settings to see what the relay settings are.  What are you using for SMTP?  Exchange?  MailEnable?  Unix handles SMTP natively with SENDMAIL and it's the standard for unix so it almost always works.  

With a little more imput on the environment configurations and what exactly line 83 is, we should be able to fix this up in a jiffy.

Joe Jenkins
this machine Im hosting this emailing application on is a shared hosting machine with a hosting company
ASKER CERTIFIED SOLUTION
Avatar of NetExpert
NetExpert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmm.  Does line 83 have anything to do with the "from" portion of your header?  If it does, does it look more like:
$headers .= 'From: "Sender Name" <sender@domain.com>'. "\r\n";

With a mail() execution like this:
mail($to, $subject, $message, $headers);

Or like this:
$headers .= 'From: <sender@domain.com>'. "\r\n";
mail($to, $subject, $message, $headers);

If it looks like the first one, this could be your problem.  PHP mail() for windows doesn't support the address this way.  I ran into something similar to this on a news email list mailer program a few years ago on a client's machine.

Joe Jenkins
That's funny.  I was typing my response while you submitted yours.  That teaches me to not check my email during submissions to check for a dupe.  :)

Joe Jenkins