473,385 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Mailto page as an attachment, or HTML

I've been up and down trying to figure this one out with no luck. Is it
possible to have a mailto link or some other way with Javascript that can
send the HTML content of the current page or of an IFRAME in the page as an
email?

Here's what I have:
----------------
<HTML>
<SCRIPT LANGUAGE="JavaScript">
<!--//

function mailIt() {
var cnthtm=escape(document.content.document.all[0].innerHTML);

var
url="mailto:jo*************@coldmail.com?subject=h ey&body="+document.content
..document.all[0].innerHTML;
var EmailWindow = window.open(url, EmailWindow,
"status=yes,height=400,width=600,scrollbars=yes,lo cation=yes,statusbar=yes,r
esizable=yes,toolbar=yes");
EmailWindow.focus();

}

//-->
</SCRIPT>

<BODY STYLE="margin: 0px; padding: 0px;">
<A HREF="javascript:mailIt();">Email to jo*************@coldmail.com</A>
<IFRAME NAME="content" SRC="test.htm" WIDTH=100% HEIGHT=90% STYLE="margin:
0px; padding: 0px;"></IFRAME>
</BODY>
</HTML>

----------------

The Test.htm looks like this:

---------------
<HTML>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
x
</BODY>
</HTML>
---------------

Though the final version will include lots of HTML.

Anyway, what happens is an email opens with the HTML source showing. Is
there away to have it actually treated as HTML and rendered such as if it
where na HTML mail (yes, I know everyone out there does not support HTML
email, but we'll be in a controlled environment).

Or, alternatively, is there a way to specify an attachement for a mailto
url?

The real content being mailed will only be accessable on the intranet while
logged in, so just emailing the URL is not an option.

Any help would be appreciated!

--
I'm Joe Larson, and I approve this message
http://www.soundclick.com/joewlarson
We're Bushed-- please Kerry us! - Kerry Edwards 2004
Jul 23 '05 #1
2 12555
In article <10*************@corp.supernews.com>,
jo***************@hotmail.com enlightened us with...

The real content being mailed will only be accessable on the intranet while
logged in, so just emailing the URL is not an option.


The only solution I have seen to this is a server-side solution, not client-
side javascript.
There ARE free server-side scripting languages available if the boss is
cheap. ;) Perl and PHP are both free and run on the apache web server, also
free.

--
--
~kaeli~
A man's home is his castle..., in a manor of speaking.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
In article <10*************@corp.supernews.com>, Joe W Larson says...
I've been up and down trying to figure this one out with no luck. Is it
possible to have a mailto link or some other way with Javascript that can
send the HTML content of the current page or of an IFRAME in the page as an
email? url="mailto:jo*************@coldmail.com?subject=h ey&body="+document.content
.document.all[0].innerHTML;

Cool. A mal-formed URL. It's already broken.

--
Hywel

http://sponsorhywel.org.uk/
Jul 23 '05 #3

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

Similar topics

3
by: Mark Goldin | last post by:
Is it possible using mailto: to create an email with everything except an attachment and then when a user clicks on send intercept that form and recreate the email on the server and add a file to...
2
by: Tiro Orsa | last post by:
Hey all... GOAL: My end goal is to send a web page (single file) as an attachment (not embedded) via email to any of the main email clients (Eudora, Outlook, etc). Users see a single web page...
12
by: ElvisIsDead | last post by:
Have a script that takes a form and emails it automatically. Here is the part: <form onSubmit="return editData();" name="estm" enctype="text/plain" method="post"...
15
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...
7
by: Brian Paul | last post by:
When a user clicks on a linkbutton on a page, i would like to render a printer-friendly version of the asp.net page and download it as an html attachment to the browser. The code below works great,...
1
by: Andrew | last post by:
I'm adding this as it to me a while to figure out all the pieces to be able to do this without using Microsoft.Office.Interop which caused me problems on the web-server. Streaming is the easy...
3
by: toufik | last post by:
Hi, How can we add an attachment to an email using mailto, I've this code to open a new email window (default email), it works but I like to add an attachment to it Dim mailMess As String =...
12
by: cj | last post by:
What's the parameter (like ?attachment) or something.
6
by: Mike | last post by:
I have to use mailto so the pages opens up the users default client. I need to format the body of the email in HTML format so I can show some the text in bold, italics and underlined? Is this...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.