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:
- 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...
- Where Can I Find Or Make An Email Spoofer Or Php Spoof Form? I am looking for a email spoofer or a code...
- Simple email sender Learn more about Simple email sender by visiting our website....
- How To Code A Simple Php Dynamic Dropdown Form Feild From Mysql? I been struggling with this all morning. I am tiring...
- 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.


April 30th, 2009 at 11:27 pm
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 “
“;
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”);
April 30th, 2009 at 11:27 pm
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