?
Solved

using mailto in form action attribute

Posted on 2002-04-10
10
Medium Priority
?
195 Views
Last Modified: 2010-04-09
How do I get the mailto in my form action attribute to simply email the contents of the form, instead of calling up my email program.  I have
<FORM action="mailto:me@ix.netcom.com?subject=testing">

and it calls up my Eudora, which is not what I want.  Is there a way to email the form input directly (unformatted, I know) without having to write a script?
0
Comment
Question by:ironfingers
[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
10 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 400 total points
ID: 6932224
The mailto protocol has to have an email client.  It will invoke whatever the user has installed, as the default email client.  The browser by itself cannot email anything.  So if you use mailto you are dependent on an email client, or you have to have a script on the server side to process the form.

Cd&
0
 
LVL 10

Expert Comment

by:KenAdney
ID: 6932279
An alternative is to use CDONTS which has to have SMTP running on the server.  It runs on an ASP page.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6932294
> Is there a way to email the form input directly (unformatted, I know) without having to write a script?

Short answer: no.
Long answer: it might be possible using JavaSript, ActiveX or any other (dangerous) scripting, but be prepared that you never get a solution which works everywhere, always, as you expect
0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 18

Expert Comment

by:bruno
ID: 6932431
>>Is there a way to email the form input directly
(unformatted, I know) without having to write a script?


NOPE...but the scripts to send mail are very easy.  Can you use ASP or ColdFusion or any server side scripting language?
0
 
LVL 10

Expert Comment

by:KenAdney
ID: 6932465
Just in case you can run ASP (and the server supports sending mail), here's a sample script:

<%
recipients = request.form("recipients")
from_name = request.form("from_name")
form_element = request.form("form_element")

Set objCDOMessage = Server.CreateObject("CDONTS.NewMail")
' creates the object
     objCDOMessage.From =  from_name ' the address listed as "From"
objCDOMessage.To =  recipients ' the address listed as "To"
' you could include bcc and cc recipients as well
objCDOMessage.Subject = "The Subject Line" ' specify the subject header
objCDOMessage.Body = "Here is what was on the form:" & vbcrlf &_
 "Some text:" & form_element
     'now send the message
objCDOMessage.Send

'wrap things up
Set objCDOMessage = Nothing
%>
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6932491
Ahem,

>>>Is there a way to email the form input directly
(unformatted, I know) <em><b><font size=48pt>without having to write a script?</font></b></em>

Cd&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6932495
Oops,
</em>
0
 
LVL 10

Expert Comment

by:KenAdney
ID: 6932500
Ok, ok, ok.  I agree, the answer to the question asked is "no".  :-)
0
 

Author Comment

by:ironfingers
ID: 6932790
I know PHP.  Hopefully the server supports it.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6933575
Glad we could help.  Thanks for the A. :^)

Cd&
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

771 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