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
prowebinteractiveAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NetExpertCommented:
What is your line 83 in index.php file?
0
prowebinteractiveAuthor Commented:
$bil = mail($dest, $suj, $lebody, $tope);
0
prowebinteractiveAuthor Commented:
I put a this now

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

I dont get the error anymore but the email is not being sent
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Joe JenkinsCommented:
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
0
prowebinteractiveAuthor Commented:
this machine Im hosting this emailing application on is a shared hosting machine with a hosting company
0
NetExpertCommented:
Try turn off smart header format in your header field.

For example, use
"From: sender@domain.com\r\n"
instead of
"From: Sender <sender@domain.com>\r\n"

That's the only thing I've found that stop working on Windows so far.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Joe JenkinsCommented:
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
0
Joe JenkinsCommented:
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.