PHP Mail Function not working

Discussion in 'General' started by Xioyn, Aug 29, 2011.

  1. Xioyn

    Xioyn New Member


    I searched the forums and found this thread and I am having a similar problem but his solution will not work for me.
    postqueue -p
    dig mx
    Now then is this because I haven't set mail up for this website? Or because I named the server

    Or is it something else? I tried changing the dns zone on godaddy but it won't accept just my ip address.

    Should I reinstall the server with a better name anyway?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats the problem. You should have replaced with the real name of your server during installation. To fix that, edit the files:


    and replace the hostname with the real hostname of your server, e.g. and make sure that exists as dns A-Record in DNS which points to the IP address of your server.
  3. Xioyn

    Xioyn New Member

    Okay that worked for 1 email it went into my spam but now it won't send another.
    I have attached a screenshot of my GoDaddy DNS manager with the black smudge being the static IP for the server.

    Here are postqueue -p and dig mx again.

    How do I go about removing mail from the queue?

    Attached Files:

    Last edited: Sep 1, 2011
  4. Ben

    Ben ISPConfig Developer ISPConfig Developer

    If i get this right, you are sending mails with in this case a php script, right?

    Because looking at the queue message this looks for me like your server does not reach the destination mailserver, as the connections times out.
    Did you check your message log for maybe dropped outbound connections?
    You may test this via
    If you see any response, just enter "quit" and hit enter.

    Does sending mails to other recipients work for you? Eventhough I think it does not make a difference, did you try sending to the same thing just via the mail command.

    Regarding the queue handling, here's a short manual:

  5. Xioyn

    Xioyn New Member

    I just remembered that I am behind a router which is probably the cause of my problems.

    Nvm about the ports they are


    Taken from the ISP Config Firewall
    Last edited: Sep 4, 2011
  6. falko

    falko Super Moderator ISPConfig Developer

Share This Page