Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

send email with input data

Posted on 2011-03-08
5
Medium Priority
?
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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 …
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

721 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