Results 1 to 5 of 5

Thread: How do i send Emails from a Submit button?

  1. #1

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327

    Question How do i send Emails from a Submit button?

    I think someone answered this question before, but anyway:

    How do i send information such as inside TextBoxes, Passwords, selected combos, ect. over EMail?

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099
    Code:
    <form action="mailto:[email protected]" method="post">
    <input type="text" name="stuff">
    <input type="checkbox" name="check" value="wow">
    <input type="submit" value="send email" name="submit">
    </form>
    this will send it to your email address. the form data will be in an attachment.

    btw. its send from the client

  3. #3

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327
    it didn't work

  4. #4

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327
    isn't there a code that WONT bring up Outlook or MSN "Write E-Mail"? and justs sends it?

  5. #5
    New Member racing_fire's Avatar
    Join Date
    Jun 2002
    Location
    USA
    Posts
    13
    Then you need to send it server-side. Use PHP, perl or any other web-languages.

    i can show you in PHP:

    1 thing: make sure your server has enabled the PHP's mail command

    1 page:
    Code:
    <form action="THESCRIPT.PHP" method="post">
    <input type="text" name="subject">
    <input type="text" name="message">
    <input type="submit" value="send email" name="submit">
    </form>

    THESCRIPT.PHP:

    PHP Code:
    $yourname "Enter your or your site's name here in-between the quotes";
    $sendemail "Enter the email to send this to here in-between the quotes";

    /***************************************
      **THAT'S IT DON'T TOUCH THE CODE BELOW**
    ***************************************/
    $message $message "\n\nIP Address Of User: " $HTTP_SERVER_VARS["REMOTE_ADDR"];
    $mailstat mail($sendemail$subject$message);
    if (
    $mailstat == TRUE) {
         echo 
    "<h2>Maill Sent!</h2>";
    } else {
         echo 
    "<h2>Maill Couldn't Be Sent.</h2>";

    As for other languages i wouldn't be able to help.

    PHP Information
    Another post by Kevin.

    Best viewed with common sense enabled.

Posting Permissions

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



Click Here to Expand Forum to Full Width