472,782 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,782 software developers and data experts.

Simple mailto snippet?

I am building a stand alone html help system (.chm.) So the usual woes with
mailto are not going to be encountered. Likewise I am ensured all my
intended users have Outlook installed. With that said This is what I want
to do.

I have a simple html form with a an radio button option group, a listmenu, a
text box, and a text area. What I would like to do is have a user fill out
this form, and hit a button that sends the results via outlook. The TO, CC,
and subject fields will be hard coded. I want the option from the list menu
on line one, the radio button on line two, the text box on line three and
the multi-line text area starting on line 4.

I haqve searched the web, and groups all day to no avail. Everything I have
tried simply fails. I even tried breaking this down into a simple one text
box one button, with no good results via javascript. I can get it to work ok
without javscript, but instead of new lines they just overwrite each other.

Jul 23 '05 #1
3 2173
You need to post the form to a simple form handler that uses a
server-side language like Classic ASP, PHP, or ASP.NET that has a mail
script you can configure. JavaScript does not send emails.

Determine what technology your server uses, then check for a simple
mail script using that technology. Should be easy.

Jul 23 '05 #2

Sorry, It is designed for a .chm file. SO it must be client side. I realize
that javascript doesn't send e-mail, but it can send via mailto, I need help
with that

Jul 23 '05 #3
Yogi_Bear_79 wrote:
I am building a stand alone html help system (.chm.) So the usual woes with
mailto are not going to be encountered. Likewise I am ensured all my
intended users have Outlook installed. With that said This is what I want
to do.

Given the above caveat, play with the following. Note that I
think Outlook has a 2,000 character limit on what you can send
via mailto. Lotus Notes has a limit of about 200 characters:
<script type="text/javascript">
function prepMail(f) {
var previewHTML =
'<b>To:</b> ' + f.address.value + '<br>'
+ '<b>cc:</b> ' + f.cc.value + '<br>'
+ '<b>Subject:</b> ' + f.subject.value + '<br>'
+ '<b>Body:</b><br> '
+ f.body.value.replace(/\n/g,'<br>') + '<br>'
+ '<a href="mailto:' + f.address.value
+ '?cc=' + f.cc.value
+ '?subject=' + f.subject.value
+ '?body=' + escape(f.body.value)
+ '">Click here to send</a>'
document.getElementById('previewPane').innerHTML = previewHTML;


<form action="" name="mailForm">
<input type="text" name="address"
<input type="text" name="cc"
<input type="text" name="subject"
value="Test of mail to">Subject<br>
<textarea name="body" value="so*****@hotmail.com"
rows="20" cols="50">Body</textarea><br>
<input type="button" value="Preview message" onclick="
<table style="border: 1px solid blue"><tr><td width="50%">
<span id="previewPane"><i>preview will appear here</i><span>

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Christoph Lehmann | last post by:
Hi I am a newbie and have a very simple python code, doing some calculations. maybe there is one already having a code snippet in wxPython for what I need: (i) simple dialog box, where the...
by: Val | last post by:
Any experts on mailto: tags? I want to set a link so that the subject and some of the body of the email is filled in. This is easy for simple text, although you need to use %20 for spaces: <a...
by: Adam Smith | last post by:
How can I set up a mailto with a cc or bcc as well as a subject designation. The system works for two but not three, is this a hardwired limit or have I missed something ==> <a...
by: Pete | last post by:
Does anyone have a simple html vbscript or other type of snippet they can share that appends a record to a access database via ADO or DAO? I would like to allow users that don't have Microsoft...
by: tshad | last post by:
I am trying to put an persons email address in a response I am sending another person. I can get it to work by doing the following: message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant:...
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
by: Not Me | last post by:
Hi, Yet another error that should be easy to fix.. I have a datalist linked to an sqldatasource, and I'm wanting to fill it with data from that source. The following works fine: ...
by: Richard | last post by:
Hi, the following snippet of HTML works fine for standard email clients but does not do so for web based email:- <A HREF="mailto:someone@nodename.demon.co.uk?subject=Freecycle%20Extension%2...
by: pamela fluente | last post by:
Hi, please find below a very simple code snippet which is giving me the following error: System.Runtime.Serialization.SerializationException was unhandled Message="The constructor to deserialize...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.