SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Send form data by email

    Hi, I have a site under construction. It is not on line yet and I don't have a domain name yet.
    I test it with IIS 7 and works fine. Now I need a form to collect information from visitors.
    The information should be sent to me by email.I looked at various solutions on line.Usually
    searching various sites I've seen that you have 3 files.One is the actual form.One is a php script
    and finally an html thanks page.I did all that and put the folder(name Test)containing the 3 files
    in the inetpub/wwwroot folder.I launch my browser IE9, fill the form with data and nothing, it
    does not work.I have changed the address on the php file with my own email address <snip>.
    I read somewhere that this does not work with yahoo mail or hotmail, so I tried with my ISP
    mail <snip>.Nothing to do. Can anyone help me before I go nuts?Thanks a lot.
    Last edited by TechnoBear; Dec 16, 2012 at 09:28. Reason: Private info removed

  2. #2
    SitePoint Addict
    Join Date
    Apr 2011
    Posts
    265
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    To send form data to an e-mail address with PHP, you need to have instaled a mail server, configured to work with php.
    PHP sends data to the mail server, that sends data to e-mail address.
    Or, you can use a public SMTP server, for example from GMail, and the phpMailer class. You just need a GMail account, which is free. Then, check on the net for phpmailer.
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,203
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Hi carlo2837. Welcome to the forums.

    Yes, it's not so easy to send mail from a form on your local machine. Here is another thread at the moment on the same topic:

    http://www.sitepoint.com/forums/show...ssage-to-email

  4. #4
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    email form

    Quote Originally Posted by MarPlo View Post
    Hi,
    To send form data to an e-mail address with PHP, you need to have instaled a mail server, configured to work with php.
    PHP sends data to the mail server, that sends data to e-mail address.
    Or, you can use a public SMTP server, for example from GMail, and the phpMailer class. You just need a GMail account, which is free. Then, check on the net for phpmailer.

    Thank you very much I appreciate it, I'll try it, hope I can do it.Shouldn't my Alice mail which is MTP work? Problem is don't have much support with them so I'll follow your advice.Thanks again.Carlo


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •