php mail bounced <full mailbox>

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • usafshah
    New Member
    • Nov 2006
    • 104

    php mail bounced <full mailbox>

    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\wwww root\testdomain \phpmailer\inde x2.php on line 5

    Message delivery failed...


    here is the script that i used;

    Code:
    <?php
    $to = "recipient@example.com";
    $subject = "Hi!";
    $body = "Hi,\n\nHow are you?";
    if (mail($to, $subject, $body)) {
      echo("<p>Message successfully sent!</p>");
     } else {
      echo("<p>Message delivery failed...</p>");
     }
    ?>
    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
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    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

    Comment

    • usafshah
      New Member
      • Nov 2006
      • 104

      #3
      ok i have changed the code to use header (from etc)

      Code:
      <?php
      $headers = 'From: abc@mydomain.info' . "\r\n" .
          'Reply-To: abc@mydomain.info' . "\r\n" .
          'X-Mailer: PHP/' . phpversion();
      $to = "myid@gmail.com";
      $subject = "Hi!";
      $body = "Hi,\n\nHow are you?";
      if (mail($to, $subject, $body,$headers)) {
        echo("<p>Message successfully sent!</p>");
       } else {
        echo("<p>Message delivery failed...</p>");
       }
      ?>



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

      Comment

      • usafshah
        New Member
        • Nov 2006
        • 104

        #4
        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
        Last edited by ak1dnar; Sep 28 '07, 02:52 PM. Reason: Removed bold text formating from the entire post

        Comment

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          Thanks for sharing your findings with us. Hope this helps somebody else.

          Ronald

          Comment

          • ak1dnar
            Recognized Expert Top Contributor
            • Jan 2007
            • 1584

            #6
            If any of you familiar with "exchange server" Please take a look at on this thread.PHP With Exchange Server 2003

            Comment

            Working...