473,811 Members | 3,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="JavaS cript">
<!--//

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

var
url="mailto:jo* ************@co ldmail.com?subj ect=hey&body="+ document.conten t
..document.all[0].innerHTML;
var EmailWindow = window.open(url , EmailWindow,
"status=yes,hei ght=400,width=6 00,scrollbars=y es,location=yes ,statusbar=yes, r
esizable=yes,to olbar=yes");
EmailWindow.foc us();

}

//-->
</SCRIPT>

<BODY STYLE="margin: 0px; padding: 0px;">
<A HREF="javascrip t:mailIt();">Em ail 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="#FFFFF F" 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 12606
In article <10************ *@corp.supernew s.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.supernew s.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* ************@co ldmail.com?subj ect=hey&body="+ document.conten t
.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
7978
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 it? Thanks
2
13982
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 attachment and either double click or "view in browser" in order to view it. (It is an attachment after all).... When they DO open Internet Explorer (is all I need, not netscape), a single image appears with some appended text.
12
2981
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" action="mailto:user@domain.com?subject=Daily numbers&body=window.this.document"> I would like for it to open the default email program and let me choose an address from that form. Is this possible? Any suggestions are appreciated. Elvis
15
29925
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 href="mailto:nobody@nowhere.com ?subject=Your web site &body=This%20is%20the%20%body!"> click here</a>
7
2257
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, with a few exceptions: 1) IE displays the FIle Download dialog box twice. (You have to click the Open button twice) 2) the encoding of the page is set to Western European (Windows) versus UTF-8. #1 above is just a pain. #2 above results in...
1
4362
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 part, but I couldn't initially work out how to manipulate the page setup to change page margins and orientation, that's why I was looking at Microsoft.Office.Interop. But with Microsoft.Office.Interop I couldn't fiure out how to stream HTML...
3
6025
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 = "mailto:" & ReplaceSpecialCharacters(mailTo) mailMess = mailMess & "?Subject=" & ReplaceSpecialCharacters(mailSubject) mailMess = mailMess & "&Body=" & ReplaceSpecialCharacters(mailText) System.Diagnostics.Process.Start(mailMess)
12
2785
by: cj | last post by:
What's the parameter (like ?attachment) or something.
6
2964
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 possible to do? if so how?
0
9726
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10395
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7667
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4338
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.