Search
Syndication
Sponsors

How To Direct Values From Php Textboxes In A Form To A Email Account?

I have a web form at designed in php. Can you provide me with a simple code to connect a textbox to an email account.

Related posts:

  1. I Made Feedback Form In Php Which Takes Feedback From User And Send To My Hotmail Email Account? now i want to upload this feedback.php form into an...
  2. Where Can I Find Or Make An Email Spoofer Or Php Spoof Form? I am looking for a email spoofer or a code...
  3. Simple email sender Learn more about Simple email sender by visiting our website....
  4. How To Code A Simple Php Dynamic Dropdown Form Feild From Mysql? I been struggling with this all morning. I am tiring...
  5. Can Somebody Explain Exactly How I Put The Php Form Handler In My Html Code? or is it seperate and linked to the html code...

Related posts brought to you by Yet Another Related Posts Plugin.

Tags: , , , , , ,

2 Responses to “How To Direct Values From Php Textboxes In A Form To A Email Account?”

  1. DzSoundN Says:

    here all you have to do is
    require_once(’whateveryounamemyfile’);
    $MyMail=new MyMail($To=”Email address”, $Subject=”Subject”, $Msg=Message or body, $From=”From email address”, $ReplyTo=”reply to email address.or use from email address”);
    < ?
    /***********************
    CLASS :: MYMail
    ************************/
    class MyMail{
    var $To;
    var $Subject;
    var $Msg;
    var $Headers;
    var $From;
    var $ReplyTo;
    /*
    $headers = 'From: webmaster@example.com‘ . “rn” .
    ‘Reply-To:
    webmaster@example.com‘ . “rn” .
    ‘X-Mailer: PHP/’ . phpversion();
    mail($to, $subject, $message, $headers);
    ***&&&&&*******
    For HTML Mail
    ‘MIME-Version: 1.0′ . “rn”;
    $headers .= ‘Content-type: text/html; charset=iso-8859-1′ . “rn”;
    */
    function MyMail($To, $Subject, $Msg, $From, $ReplyTo){
    $this->To=(empty($To)) ? “0″ : $To;
    $this->Subject=(empty($Subject)) ? “0″ : $Subject;
    $this->Msg=(empty($Msg)) ? “0″ : $Msg;
    $this->From=(empty($From)) ? “0″ : $From;
    $this->ReplyTo=(empty($ReplyTo)) ? “0″ : $ReplyTo;
    $this->Headers=”MIME-Version: 1.0″ . “rn” . “Content-type: text/html; charset=iso-8859-1″ . “rn” . “From:” . $this->From . “rn” . “Reply-To:” . $this->ReplyTo . “rn” . “X-Mailer: PHP/” . phpversion();
    $SetMail=array(
    ‘To’=> $this->To,
    ‘Subject’=> $this->Subject,
    ‘Msg’=> $this->Msg,
    ‘Headers’=> $this->Headers,
    ‘From’=> $this->From,
    ‘ReplyTo’=> $this->ReplyTo
    );
    if(in_array(”0″,$SetMail)){
    echo “

    Something wrong with the mail! Please make sure all fields are filled in!

    “;
    return;
    }
    else{
    if(!mail($SetMail['To'], $SetMail['Subject'], $SetMail['Msg'], $SetMail['Headers'])){
    $this->Errors=”SYS”;
    echo ““;
    }
    }
    }
    }
    ?>
    $MyMail=new MyMail($To=”Email address”, $Subject=”Subject”, $Msg=Message or body, $From=”From email address”, $ReplyTo=”reply to email address.or use from email address”);

  2. Atif Majid Says:

    What i understand is you want to send the contents in textbox in an email.
    For this you need to submit your form to another php page and then send email. See the following code

    Now on mail.php
    < ?php
    $strContent = $_POST['strContent'];
    $strTo = "to@yahoo.com";
    $strFrom = "from@yahoo.com";
    mail($strTo, "This is subject", $strContent, "From:".$strFrom);
    ?>
    If SMTP settings are OK in php.ini, your email will be recieved at $strTo from $strFrom.

Leave a Reply

Translate
Links

Tags