mail problem (mail server is running) but mail() is not working.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bilal
    New Member
    • Jul 2006
    • 2

    mail problem (mail server is running) but mail() is not working.

    I have installed PHP , Apache on WinXP . I am using php mail function but i am getting error i also have installed Argosoft mail server and it is running properly using port 25 and php.ini is also configured properly. But i m getting error

    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 D:\Program Files\Apache Group\Apache2\h tdocs\email.php on line 8

    please tell me the reason.When page is loaded request goes to smptp server
    here is the log produced by mail server when request goes to server.
    SMTP server started. Listening on port 25
    7/24/2006 3:48:57 PM - POP3 server started. Listening on port 110
    7/24/2006 3:48:57 PM - IMAP server started. Listening on port 143
    7/24/2006 3:48:57 PM - Web server started. Listening on port 80
    7/24/2006 3:48:57 PM - Using normal message scheme, Size=5
    7/24/2006 3:49:29 PM - { 1} START SMTP
    7/24/2006 3:49:29 PM - Requested SMTP connection from 127.0.0.1 [127.0.0.1], ID=1
    7/24/2006 3:49:29 PM - ( 1) Evaluation period has expired
    7/24/2006 3:49:29 PM - SMTP connection with 127.0.0.1 [127.0.0.1] ended. ID=1
    7/24/2006 3:49:30 PM - { 1} END SMTP
    7/24/2006 3:50:15 PM - { 2} START Web
    Please help me out i have visited a lot of forums but i did'nt find any solution for that.
    I will thankul for this.
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi there,

    open up your command prompt and type the following command to make sure you port 25 [smtp] is ready and listeing to incoming connection..

    telnet localhost 25

    Comment

    • ronverdonk
      Recognized Expert Specialist
      • Jul 2006
      • 4259

      #3
      I recall having this problem myself once. Reason was that I had
      SMTP=localhost left in php.ini. After I changed it to a real mail server, e.g. SMTP=mail.provi der.nl it ran.
      Maybe this does not apply in your case, but ít is worth a try.

      Ronald :cool:

      Comment

      • bilal
        New Member
        • Jul 2006
        • 2

        #4
        i have run the command telnet localost 25 it gives the following result
        501 Evaluation period has expired


        Connection to host lost.

        I am using cable net (LAN) how can ii ind my real server name????????
        i have installed ARGOSOFT smtp server but wen it is started it gives thhe following messege i think problem is with this mail server. When it gets started it gives the ollowing messege
        Mail server appaears to be started but incoming requests may not be accepted.

        Comment

        • eeau1973
          New Member
          • Jul 2006
          • 4

          #5
          hi bilal ...
          i was getting that error too ... after trying many options this works for me ...
          in your c:\windows\php. ini go to this section:

          [mail function]
          ; For Win32 only.
          SMTP = writehereyoursm tpserver
          smtp_port = 25

          ; For Win32 only.
          sendmail_from = writeheremiuser @myemailserver

          uncomment that lines , save your php.ini, restart your http server and try again sending email using your form :D ...

          greetings ...

          Comment

          • jchemie
            New Member
            • Aug 2006
            • 1

            #6
            Well if the server is not yours then what you can do is try sending an smtp mail instead of using phpmail function. Search in google fpr further information.

            Thanks

            Jyot Vakharia

            Comment

            Working...