Results 1 to 4 of 4

Thread: PHP mail function

  1. #1
    Join Date
    Apr 2009
    Posts
    11

    Default PHP mail function

    Hello! I got my VPS up and working and it's running great.

    The only thing I am having a problem with is sending mail via PHP.

    I have not set up a mail server, I actually have my mail for the server set up through ipower, where I got the domain and who handles the DNS. I found it easier for me to do it this way.

    Anyway....when setting up the mail function/form on the website, I am able to receive email via php to any other email address when testing it but not able to receive any email that is directed to my domain. Not much of a contact form.

    I am not sure what I have to configure php.ini to to get this to work. I have searched the web for a few days and find a lot of info on getting it to work with windows but nothing that really helps me.

    any help would me appreciated and thanks in advance.

    This is what my php.ini says for the mail function.

    Code:
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    sendmail_path = /usr/sbin/sendmail -t -i
    sendmail_from = webmisress@chatwhisper.com

  2. #2
    Join Date
    Dec 2007
    Posts
    1,141

    Default

    Sendmail is working as intended - that is, it is delivering mail sent "locally" to your /var/mail directory. (you should be able to find any mail sent via your contact form in this location)

    The best way to ensure that "local" mail gets to the actual destination via the external mail server would be to disable sendmail local delivery.

  3. #3
    Join Date
    Apr 2009
    Posts
    11

    Default

    That worked!

    I love you!

  4. #4
    Join Date
    Oct 2007
    Location
    UK
    Posts
    129

    Default

    Make sure that you have a minimal sendmail running as a daemon. This is required to support queuing. It is possible that a message cannot be delivered at the moment because of network problems or what-have-you, and in this case the message will be queued. If a sendmail daemon isn't running, the queue will never be processed.
    Charles Haley
    www.haleys.eu/chaley

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •