Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

send email with input data

Posted on 2011-03-08
5
Medium Priority
?
213 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 84

Accepted Solution

by:
Dave Baldwin earned 668 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 84

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 1332 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 1332 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

782 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