Help needed in PHP.. urgent.

Discussion in 'PHP' started by jatss123, Sep 27, 2007.

  1. #1
    I am new to PHP.
    I m trying to make page for "Writing code to SEND A MESSAGE".

    I have connetcted to localhost but its not going through and showing this error message.



    Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\Newland Tours\TMP5m5d4p19i0.php on line 6


    Can any one tell me.. how to solve problem >???? :confused::confused::confused::confused:
     
    jatss123, Sep 27, 2007 IP
  2. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #2
    If you don't understand the error message, or if you are not familiar with php.ini then you should contact you hosting company and tell them the story.
     
    nabil_kadimi, Sep 27, 2007 IP
  3. vonvhen

    vonvhen Peon

    Messages:
    152
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    From reading the error message, you might want to check your php.ini settings.
     
    vonvhen, Sep 27, 2007 IP
  4. undir

    undir Peon

    Messages:
    696
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    please contact your webhost.
     
    undir, Sep 27, 2007 IP
  5. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #5
    You are running on localhost. You will need to open port 25 and configure the installation to work with your real online mailsever. That may or may not be a smart thing to do.

    I can't tell you how since I chose not to do it. There should be some info in you doc files on how to do it.
     
    Colbyt, Sep 27, 2007 IP
  6. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #6
    You will see this error if you dont have internet connection working. Further it looks like you are running the script on your PC. Upload to server and see how it works.
     
    olddocks, Sep 27, 2007 IP
  7. sabmalik

    sabmalik Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Do you have any POP or SMTP accounts you use for email? For instance i use outlook for my email on my server which has a POP and SMTP server.

    The settings in outlook for my SMTP will go like mail.domain.com , you can put the same mail server address in your php.ini. If your SMTP requires POP before SMTP , then when you check email with outlook once via the POP, it makes your IP valid for sending out emails through the SMTP for i think one hour.

    Hope this gives you a pointer. Otherwise as the rest said the best option is to use a proper hosting server for this type of thing.
     
    sabmalik, Sep 27, 2007 IP