Need a button to print email, not send email.

sasnaktiv
sasnaktiv used Ask the Experts™
on
Hi Guys,
I'm sending out html email successfully, and want to include a button within the email message/content that will allow the recipient of the email to click and print the email that he/she received. I'm doing this because I've discovered that many people have no idea how to print an email so I want to make it as dummy proof as possible.

What code do I need to add in my html email in order to accomplish this monumental feat?
Thanks,
Sas
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
I think you're going to find out that it isn't allowed.  A 'print' button on a web page is done with javascript and email clients block javascript and other active content as a security measure.
DavidPresident
Top Expert 2010

Commented:
To add to what DaveBaldwin wrote, some firewalls and mail servers will block the entire message, others will block the javascript only.  So what you will end up with is even more confusion.,  Some people won't get your email.  Others will get a print box that doesn't work.

So now you know why people don't bother doing this ... it is unworkable.

Commented:
Here's what you asked for if you can get through the other hoops....
<!-- This Script is from www.htmlfreecodes.com, Coded by: Krishna Eydat-->
<!-- Print Page Script
Use this script to have your
users print your HTML page
-->
<SCRIPT LANGUAGE="JavaScript">
if (window.print) {
document.write('<form> '
+ '<input type=button name=print value="Click" '
+ 'onClick="javascript:window.print()"> To Print this page!</form>');
}
// End -->
</script>

<font face="Tahoma"><a target="_blank" href="http://www.htmlfreecodes.com/"><span style="font-size: 8pt; text-decoration: none">HTML Free Code</span></a></font>

Open in new window

Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

Commented:
Try this:

<html>
<head>
<title>Print</title>
</head>
<body>
<h1>Print</h1>
<input type="button"
  onClick="window.print()"
  value="Print This Email"/>
</body>
</html>

Author

Commented:
Hi Kinecsys,
Thanks for the reply, but I've already tried that (to the letter) with no success.
Sas

Author

Commented:
Thanks jsdray,
But Javascript does not function with eMail.
Sas

Commented:
Yeah, same reason as jsdray's, mine has the same javascript command buit-in to the html. I'm not sure you can do it without javascript.
DavidPresident
Top Expert 2010

Commented:
You can do it without javascript, but you would need to write your own email client or plug-in which would be ridiculous.   Give it up, you might as well ask for a button to mow the lawn.  The capability simply isn't there.

Author

Commented:
I've requested that this question be deleted for the following reason:

It seems nobody has a solution.
DavidPresident
Top Expert 2010
Commented:
I object. The answer IS THAT THIS IS NOT POSSIBLE, for reasons stated by experts.  You can NOT do this in pure HTML code.
Hi dlethe,
I don't understand your comment. After all, you did say "Give it up, you might as well ask for a button to mow the lawn.  The capability simply isn't there. "

Please enlighten me with a solution that will function in email & I'll be happy to award the points to you.

I have created a work-around. I now simply add a link to a webpage that automatically prints when launched. It's still not a solution to my request, but it's the next best thing. At least it's the best I could come up with.

Sas

Author

Commented:
Dear EE Admin,
I thought we were only to award points to "solutions".
An answer is not necessarily a "solution".
Or am I mistaken?
If so, please review all the answers to my question, and award points as you see fit.
Thank you,
Sas

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial