email problem in php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SeeMe
    New Member
    • Mar 2008
    • 18

    email problem in php

    I want to ask about email by the coding of php. Now, I using internal serval if i want send email out by internal serval can or not? Is it i want send email out must open one web? did any way can link out?
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    I assume that by 'internal server' you mean you have a server installed at your PC, somthing like WAMP or alike.

    In order to use the mail functions of PHP you must adapt the appropriate settings in your PHP.INI file. See PHP Mail functions on how to accomplish that.

    Ronald

    Comment

    • SeeMe
      New Member
      • Mar 2008
      • 18

      #3
      i using apache and mysql. u mean is it this two?

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Originally posted by SeeMe
        i using apache and mysql. u mean is it this two?
        You would (at least) have a server (like Apache), PHP (and maybe Perl), MySQL.

        I was talking about the configuration of PHP, because that is the function mail() that you want to use.

        Ronald

        Comment

        • SeeMe
          New Member
          • Mar 2008
          • 18

          #5
          Code:
          $to  = "blue@example.com ";
          $subject = "hello my friend";
          $message = "Hello How r u?";
          $headers .= "To: blue<blue@example.com >\r\n";  
          $headers .= "From: Birthday Reminder <mymailadd@example.com>\r\n";
          
          mail($to, $subject, $message, $headers);
          my coding is like above but got error come out.
          the error is ====>
          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:\Apache2\htdo cs\mis\email.ph p on line "mail($to, $subject, $message, $headers);". so may i know how to set "ini_set()" ?
          Last edited by ronverdonk; Apr 25 '08, 10:10 AM. Reason: code within code tags!

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            Just do what I showed you in my previous post in this thread: read the mail functions chapter in the php manual and configure your mail configuration according to those instructions http://bytes.com/forum/post3157282-2.html

            Ronald

            Comment

            • mageswar005
              New Member
              • Mar 2008
              • 72

              #7
              better you may do the above forum instructions.

              Comment

              Working...