www.webdeveloper.com
Results 1 to 3 of 3

Thread: Using PHP To Email A Form

  1. #1
    Join Date
    May 2003
    Location
    Australia
    Posts
    368

    Using PHP To Email A Form

    I am wondering if I can use PHP to email the following form? And does anyone have any examples, or can anyone work with this example?
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2005
    Location
    That shadow behind you? It's not the cat. Mwahaha
    Posts
    386
    Not sure what's in those files, but you can do something like this:
    PHP Code:
    $message $_POST['postvariable1']."\n".$_POST['postvariable2'];

    $message wordwrap($message70);

    mail('caffinated@example.com''My Subject'$message); 
    Take a look at the example for more info:
    http://www.php.net/manual/en/function.mail.php

    For instance, you'll need to give it an email address to send the email from.
    GET FIREFOX!!!!

    Quote Originally Posted by shane.carr in his signature
    Don't respond by saying "Why don't you ..."
    when I state in my previous post "I don't want to ..."

  3. #3
    Join Date
    Sep 2006
    Location
    Europe
    Posts
    174
    It's worth noting that many hosts limit the ability of the mail function by only mailing to email addresses hosted by the host (and if you can make sense of that you're a clearer thinker than my English).

    That is, host xyz will only allow you to mail() to email addresses abc@xyx.com hosted by host xyz.

    It is worth using specialist form mailers such as the one from tectite.com as any good form mailer will also help protect your site from malicious attack.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles