Solved

E-mail Form as it looks on screen as attachment

Posted on 1998-12-07
6
209 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
6 Comments
 
LVL 19

Expert Comment

by:cheekycj
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 3

Expert Comment

by:hkp
Comment Utility
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 40 total points
Comment Utility
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
Comment Utility
Dear Ajoy,
Can U send some sample code so that which component u are talking about.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Uploading files to the web server has become common part of almost any kind of web application. People use different technologies to solve this, but regardless of the technology used, it is always useful to have some kind of progress indicator shown…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now