?
Solved

error with my php mailer on windows server

Posted on 2006-04-21
8
Medium Priority
?
281 Views
Last Modified: 2006-11-18
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
0
Comment
Question by:prowebinteractive
  • 3
  • 3
  • 2
8 Comments
 
LVL 7

Expert Comment

by:NetExpert
ID: 16513368
What is your line 83 in index.php file?
0
 

Author Comment

by:prowebinteractive
ID: 16513375
$bil = mail($dest, $suj, $lebody, $tope);
0
 

Author Comment

by:prowebinteractive
ID: 16513384
I put a this now

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

I dont get the error anymore but the email is not being sent
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:Joe Jenkins
ID: 16513404
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
 

Author Comment

by:prowebinteractive
ID: 16513414
this machine Im hosting this emailing application on is a shared hosting machine with a hosting company
0
 
LVL 7

Accepted Solution

by:
NetExpert earned 2000 total points
ID: 16513436
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
 
LVL 5

Expert Comment

by:Joe Jenkins
ID: 16513448
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
 
LVL 5

Expert Comment

by:Joe Jenkins
ID: 16513450
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
By following these Magento e-commerce development tips, you can increase your website's conversion and profitability. Read this post for more details.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question