By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,903 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,903 IT Pros & Developers. It's quick & easy.

php mail bounced <full mailbox>

usafshah
100+
P: 104
hi
i'm using php mail (running on windows 2003 server <built-in smtp> ) to send email to abc.com domain, the email is not reaching to the domain as i'm monitoring it. but as i run the script i get the following warning in browser:


Warning: mail() [function.mail]: SMTP server response: 452 4.2.2 Mailbox full in C:\Inetpub\wwwwroot\testdomain\phpmailer\index2.ph p on line 5

Message delivery failed...


here is the script that i used;

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $to = "recipient@example.com";
  3. $subject = "Hi!";
  4. $body = "Hi,\n\nHow are you?";
  5. if (mail($to, $subject, $body)) {
  6.   echo("<p>Message successfully sent!</p>");
  7.  } else {
  8.   echo("<p>Message delivery failed...</p>");
  9.  }
  10. ?>
when i try to send to gmail it works fine. but when i try to my exchange server i get the above warning but when i change the code to use auth it works fine for my exchange server
Sep 26 '07 #1
Share this Question
Share on Google+
5 Replies


ronverdonk
Expert 2.5K+
P: 4,258
When your server is set up to use mandatory headers, you need to add e.g. the "From: xxxx@yyy\n" in the fourth parameter of the mail command.

Ronald
Sep 27 '07 #2

usafshah
100+
P: 104
ok i have changed the code to use header (from etc)

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $headers = 'From: abc@mydomain.info' . "\r\n" .
  3.     'Reply-To: abc@mydomain.info' . "\r\n" .
  4.     'X-Mailer: PHP/' . phpversion();
  5. $to = "myid@gmail.com";
  6. $subject = "Hi!";
  7. $body = "Hi,\n\nHow are you?";
  8. if (mail($to, $subject, $body,$headers)) {
  9.   echo("<p>Message successfully sent!</p>");
  10.  } else {
  11.   echo("<p>Message delivery failed...</p>");
  12.  }
  13. ?>
  14.  



But still i can't get it, when i try on googlemail i get the message successfully.

The Quesiton is Why exchange Server isn't getting email from website (without auth)?
Sep 27 '07 #3

usafshah
100+
P: 104
LOL sorry my fault, infact not a fault :-) but just found that If Intelligent Mail Filtering is enable in exchange server sp2 then script like this when use to send email to exchange will be blocked at connection stage. Because exchange needs a proper way to authenticate smtp before sending email


Anyway cheers ! buddy hope this thread help some one else :D
Sep 27 '07 #4

ronverdonk
Expert 2.5K+
P: 4,258
Thanks for sharing your findings with us. Hope this helps somebody else.

Ronald
Sep 28 '07 #5

ak1dnar
Expert 100+
P: 1,584
If any of you familiar with "exchange server" Please take a look at on this thread.PHP With Exchange Server 2003
Sep 28 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.