Hi,

I using Xampp as a testing server, due to the simplicity of installation. How do I test if my form data gets sent to my email address upon clicking the submit button.

Does anything special software need to be installed?

    I use xampp on a XP Pro box. I had to set my smtp server settings in my php.ini and then just created a script that uses the built-in php mail() function. Works for me.

      SMTP Settings? - Do I need a mail server then?
      I want to send the data contained in a form, to my hotmail account.

      I still confused on what I need inorder to send form data to my email address.

      The following URL, contains my current PHP.ini settings:

      http://www.freewebs.com/mail2go/index2.html

        In your php.ini file look for the Modules Settings Section and look for the following code:

        [mail function]
        ; For Win32 only.
        SMTP = mail.isp.com
        smtp_port = 25
        
        ; For Win32 only.
        sendmail_from = isp_username@isp.com
        

        Replace mail.isp.com in the SMTP part with the mail server of your ISP. Mine for example is Cox so it would be smtp.west.cox.net. In the sendmail_from you have to use your e-mail account that you have setup with your ISP because 9/10 ISP's do not allow relaying and you must authenticate on the mail server before it will send your message. Hope this helps.

          rsmith wrote:

          9/10 ISP's do not allow relaying and you must authenticate on the mail server before it will send your message.

          Setting the from address to a valid e-mail at your ISP's mailserver has nothing to do with SMTP authentication.

          You are correct, however, in saying that many ISP's require the authentication. SMTP authentication, however, involves sending your username and password (just as if you were logging into your POP3 server to retrieve mail) which PHP's native mail() function does not support. If your ISP requires authentication, you must use some 3rd-party class to send mail (e.g. PHPMailer, XPertMailer, PEAR's mailing package, etc. etc.).

            Let me clarify that I did not mean authentication in the true sense of the word. I meant that you must have a username valid on the ISP's network that, when mail from your script hits it, the mail server can see that mail is being sent by a valid subscriber and will therefore, relay it. I have used PHPMailer before and it is a great program.

              Write a Reply...