PHP Mail

Discussion in 'Mac Programming' started by sebf, Nov 25, 2007.

  1. macrumors member

    Joined:
    Oct 25, 2006
    Location:
    UK
    #1
    I am currently trying to get Leopard's web sharing/PHP sending email, but I am not sure how to configure PHP's SMTP. Currently when I use PHP's mail() function it seems successful, but I don't actually receive the email.

    The only reference for setting up the SMTP in the php.ini seems to be for Windows only:
    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
    How do I configure PHP to use my ISP's SMTP server?

    Thanks for any help.
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    PHP's mail() function will return true or false if it was sent correctly (but not necessarily if it was received). You could at least check this value to make sure it's being sent.
     

Share This Page