Question:
How do i send the data in a html form to an email address?
anonymous
2009-04-17 20:35:24 UTC
How do i send the data in a html form to an email address?
Nine answers:
anonymous
2009-04-18 00:23:30 UTC
To use a scripting language to email you form contents, your hosting service must allow SMTP. For you, it would be easier to use one of the following free online form makers.



http://www.tele-pro.co.uk/scripts/contact_form/

http://jotform.com/

http://www.thesitewizard.com/

http://www.thepcmanwebsite.com/form_mail.shtml

http://emailmeform.com/



HTHs,



Ron
anonymous
2016-05-26 15:30:57 UTC
The form has to have some technical functionality to it or it will not send. Usually the server has to be able to know what you want to do when you click the send button. That has to be setup in the HTML. If you are interested try going to check out Google Docs and see if there might be a way to use their services to create a form.
anonymous
2009-04-17 20:47:04 UTC
You submit the form (the "action" part of the form header) to a PHP or ASP (depending on the type of server) page to send the email - assuming that the site has SMTP access.
anonymous
2009-04-21 08:00:44 UTC
You may like to take an html tutorial at

http://referencedesigner.com/tutorials/html/html_1.php
HandyManOrNot
2009-04-17 21:02:06 UTC
Are you asking how to email a web page to someone? Or are you asking how to submit an email from a web page?
?
2009-04-17 20:41:44 UTC
couldn't you just copy and paste the data into the body of the email?
anonymous
2009-04-17 20:46:11 UTC
I know VB.NET, Executable, Windows Applications.



Dim mail As New MailMessage()

mail.To = "me@mycompany.com"

mail.From = "you@yourcompany.com"

mail.Subject = "this is a test email."

mail.BodyFormat = MailFormat.Html

mail.Body = "this is my test email body.
this part is in bold"

SmtpMail.SmtpServer = "localhost" 'your real server goes here

SmtpMail.Send(mail)
just "JR"
2009-04-18 00:08:44 UTC
Assumin you have server-side script and SMTP enabled on your server, here is a way in HTML/php:

HTML FORM to EMAIL (Php)



Your index.html file:













Your name:

Your password:

Your email:

... ADD HERE THE REST OF THE FORM ...









(replace by their correct form - stupid editor!)

Your emailfwd.php file:












$name = $_POST['name'];

$pwd = $_POST['pwd'];

$email = $_POST['email'];

... ADD HERE THE COLLECTION OF THE FORM DATA

$to = "youremail@whatever.com";

$headers = "From: ".$email. "\r\n";

$subject = "Submitted application";

$msg = $name . " has sumitted a form!\r\n";

$msg .= "Pwd: " . $pwd . "\r\n";

$msg .= "email address: " . $email . "\r\n";

... ADD HERE THE REST OF THE DATA

mail($to, $subject, $msg, $headers);

echo ("Mail processed.");

?>



anonymous
2009-04-18 07:01:13 UTC
Code:




/***********************

CLASS :: MYMail

************************/

class MyMail{

var $To;

var $ToSender;//If you want the email to go to the sender

var $Subject;

var $Msg;

var $Headers;

var $From;

var $ReplyTo;

/*

$headers = 'From: webmaster@example.com' . "\r\n" .

'Reply-To: webmaster@example.com' . "\r\n" .

'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

***&&&&&*******

For HTML Mail

'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

*/

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" . "\r\n" . "Content-type: text/html; charset=iso-8859-1" . "\r\n" . "From:" . $this->From . "\r\n" . "Reply-To:" . $this->ReplyTo . "\r\n" . "X-Mailer: PHP/" . phpversion();



//Use this array if you want to send to only one person

$SetMail=array(

'To'=> $this->To,

'Subject'=> $this->Subject,

'Msg'=> $this->Msg,

'Headers'=> $this->Headers,

'From'=> $this->From,

'ReplyTo'=> $this->ReplyTo

);

//Use this array if you want it to go to multiple people (the sender/CC:/Bcc:)

/*

$SetMail=array(

'To'=> $this->To . "," . $ToSender,

'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'])){

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");


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...