Mail() DOESN"T work...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chunk1978
    New Member
    • Jan 2007
    • 224

    Mail() DOESN"T work...

    i keep reading "simply do this with PHPs built-in Mail() function"... wtfever! i've been trying to get this working for a week, and it's still a big mystery...

    my PHP script:
    Code:
    <?php
    $to = "jmattie@sympatico.ca";
    $subject = "PHP Mail Test";
    $body = "Testing.\n .
            This is a basic text PHP Mail Function test";
    $headers .= 'From: no-reply@image_ctrl.ca' . "\n";
    if (mail($to, $subject, $body, $headers)) {       
      echo("<p>Mail sent to $to</p>");
     } else {                 
      echo("<p>Message delivery failed</p>");
     }
    ?>
    my PHP.ini [i'm using MAC OS X (unix)]
    Code:
    [mail function]
    ; For Win32 only.
    SMTP = localhost
    smtp_port = 25
    
    ; For Win32 only.
    sendmail_from = me@example.com
    
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    sendmail_path = "/usr/sbin/sendmail -t -i"
    
    ; Force the addition of the specified parameters to be passed as extra parameters
    ; to the sendmail binary. These parameters will always replace the value of
    ; the 5th parameter to mail(), even in safe mode.
    ;mail.force_extra_parameters =
    the problem is that it keeps echoing that the mail has been sent, but i never receive anything... WHY isn't this working?

    please help... this is driving me crazy.

    thanks
  • chunk1978
    New Member
    • Jan 2007
    • 224

    #2
    hi again... sorry to keep this discussion up... but i'd like to add that in my mail.log i found this:

    Code:
    Feb 28 21:35:25 jmattie-computer postfix/smtp[716]: connect to mxmta.sympatico.ca[67.69.240.19]: Operation timed out (port 25)
    honestly, i have no idea what that means exactly? all i understand is "Operation timed out"...

    the mystery continues... unfortunately.. .

    any ideas would be greatly appreciated...

    Comment

    • halles
      New Member
      • Nov 2005
      • 7

      #3
      Originally posted by chunk1978
      hi again... sorry to keep this discussion up... but i'd like to add that in my mail.log i found this:

      Code:
      Feb 28 21:35:25 jmattie-computer postfix/smtp[716]: connect to mxmta.sympatico.ca[67.69.240.19]: Operation timed out (port 25)
      honestly, i have no idea what that means exactly? all i understand is "Operation timed out"...

      the mystery continues... unfortunately.. .

      any ideas would be greatly appreciated...
      HI.!
      I have tryed your script.. and it work's very vell for me.. as it is..

      Halles
      http://www.halleswebde sign.com

      Comment

      • chunk1978
        New Member
        • Jan 2007
        • 224

        #4
        Originally posted by halles
        HI.!
        I have tryed your script.. and it work's very vell for me.. as it is..

        Halles
        http://www.halleswebde sign.com
        hey halles,

        the script works fine on windows environments... but the problem is trying to configure it all to work with Mac OS 10.4, which uses "postfix" instead of "sendmail". .. it's confusing...

        Comment

        Working...