Solved

send email with input data

Posted on 2011-03-08
5
202 Views
Last Modified: 2012-05-11
Need a simple html form to create an email with info to send to me. Right now if the user does not have an email client, it pops up with a wizard. Any suggestions? Thanks

<FORM method="post" action="mailto:***@gmail.com" enctype="text/plain">  
Please Enter Your Name:<br />
                <input size="40" name="realname" />
                <br />
                <br />
                Please Enter Your Email Address:<br />
                <input size="40" name="email" />
                <br />
                <br />
                Please Enter Your Phone Number:<br />
                <input size="40" name="phone" />
                <br />
                <br />
                Please Enter Referral’s Name:<br />
                <input size="40" name="Referralname" />
                <br />
                <br />
                Please Enter Referral’s Email Address:<br />
                <input size="40" name="email" />
                <br />
                <br />
                Please Enter Referral’s Phone Number:<br />
                <input size="40" name="phone" />
                <br />
                <br />
                <input value="Submit" type="submit" />
                <input value="Reset" type="reset" />
</form>
0
Comment
Question by:wilcor14
  • 2
  • 2
5 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 167 total points
ID: 35071533
That would be normal operation for your situation.  Most of the time, we create a second page in a server programming language like PHP or ASP that send the email from the web server.  What you have above is all you can do with just HTML.  Do you know what server languages your web server supports?
0
 
LVL 5

Expert Comment

by:mayankagarwal
ID: 35071561
use the following code (ASP)
Dim Mail
set Mail=server.createobject("CDO.Message")
Mail.From = xxxx@xxx.xxx
Mail.To=xxxxxxx@xxxxx.xxxxx
Mail.Subject = "Subject"
Mail.TextBody = "BODY"

Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="relay-hosting.secureserver.net"
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =25
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/tpauthenticate") =1
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="my email login eg email@domain.com"
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="my email password"
Mail.Configuration.Fields.Update
'Mail.Send
set Mail=nothing
%>
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35071615
That's nice but "relay-hosting.secureserver.net" is specific to Godaddy hosting.  You would need to put in your own SMTP mail server if you use that code.
0
 
LVL 4

Assisted Solution

by:WhiteSeed
WhiteSeed earned 333 total points
ID: 35071667
i you can try with php code.
make 2 page 1 whit this code:
Question: Need a simple html form to create an email with info to send to me. Right now if the user does not have an email client, it pops up with a wizard. Any suggestions? Thanks

<FORM method="post" action="mailto:***@gmail.com" enctype="text/plain">  
Please Enter Your Name:<br />
                <input size="40" name="realname" />
                <br />
                <br />
                Please Enter Your Email Address:<br />
                <input size="40" name="email" />
                <br />
                <br />
                Please Enter Your Phone Number:<br />
                <input size="40" name="phone" />
                <br />
                <br />
                Please Enter Referral’s Name:<br />
                <input size="40" name="Referralname" />
                <br />
                <br />
                Please Enter Referral’s Email Address:<br />
                <input size="40" name="email" />
                <br />
                <br />
                Please Enter Referral’s Phone Number:<br />
                <input size="40" name="phone" />
                <br />
                <br />
                <input value="Submit" type="submit" />
                <input value="Reset" type="reset" />
</form>

Open in new window

and 1 page whit this code
<?php
 $to = $_POST['email']  //the name of the var e-mail address
 $subject = "User Info"; // a subject for the email
//write your message betwen "  "   \n go to the next line
 $body = "Hi,\n\n Admin    
,\n RealName = $_POST['realname'] \n  PhoneNumber =$_POST['phone']
\n Referralname = $_POST['Referralname'] , ecc...";  
 if (mail($to, $subject, $body)) {
   echo("<p>Message successfully sent!</p>");
  } else {
   echo("<p>Message delivery failed...</p>");
  }
 ?>

Open in new window

0
 
LVL 4

Assisted Solution

by:WhiteSeed
WhiteSeed earned 333 total points
ID: 35071704
in the first page code that i've write before delete:
<FORM method="post" action="mailto:***@gmail.com" enctype="text/plain">  

Open in new window

and replace
<form action="SECONDPAGENAME.php" method="POST" enctype="multipart/form-data">

Open in new window

0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question