?
Solved

E-mail Form as it looks on screen as attachment

Posted on 1998-12-07
6
Medium Priority
?
213 Views
Last Modified: 2013-12-25
I want to send the document which is previewed in browser by a press of a single button for printer as well as an E-mail to two or three persons as an attachment.
Example: If u are viewing a site and u want the site as it is viewed to be E-mailed to your friend as attachment.How u will do it?Please help me out
0
Comment
Question by:vipin072998
[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
6 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 1856940
I would try something like the following:
Using javscript:

<script>
function send()
{
   document.print();
   document.formname.submit();
}
</script>

<form name=formname action="mailto:<all the addresses in comma separated list>">
..form elements....
<input type=button value=submit onClick="javascript: send(); return true;">
</form>

try it out.

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 1856941
oops :)
forgot about the submitting the page part.  I haven't quite figured that out yet...
you could just add the following so they send a link:

replace All of the above (it had a few bugs I didn't test) with the following:

<form method=post name=formname onSubmit="document.formname.action" ENCTYPE="text/html">
<INPUT TYPE="hidden" NAME="URL" VALUE="javascript: document.location;">
<input type="hidden" name="tolist" value="cj.jouhal@lmco.com,cj.jouhal@lmco.com">
<input type="hidden" name="subject" value="test">
<INPUT TYPE="hidden" NAME="mail" VALUE="">
<script>
      document.formname.action='mailto:'+document.formname.tolist.value+'?subject='+document.formname.subject.value;
</script>
<input type=file name=file1 value="">
<script>
      document.formname.action='mailto:'+document.formname.tolist.value+'?subject='+document.formname.subject.value;
      document.formname.file1.value=document.location;
</script>

      <input type=submit value=submit>
      </form>


CJ
0
 
LVL 3

Expert Comment

by:hkp
ID: 1856942
I believe this would require the recipient to have an HTML enabled email program.

Why not deliver a link? You would have to be able to get all the used files on the page, and change the hrefs. Not an easy task.
0
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
LVL 3

Expert Comment

by:hkp
ID: 1856943
I believe this would require the recipient to have an HTML enabled email program.

Why not deliver a link? You would have to be able to get all the used files on the page, and change the hrefs. Not an easy task.
0
 

Accepted Solution

by:
ajoy092498 earned 80 total points
ID: 1856944
For sending the html page as an attachement by mail, you can use NewMail object of CDONTS component that comes with IIS4.0
0
 

Author Comment

by:vipin072998
ID: 1856945
Dear Ajoy,
Can U send some sample code so that which component u are talking about.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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