Code HTML Newsletter to print without email header?

They have: 1 posts

Joined: Apr 2009

Hello,

I am wondering if anyone knows how to code an HTML e-newsletter to print directly from the email without the email header (from, subject line etc.)? I've seen newsletters that do this - when you hit print from the email (not a pdf link but right from the body of your email), it prints cleanly starting at the top of the first page, without any of the email information at the top.

Thank you!

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

I would guess that they are supplying a link to print a web site, not the actual email.

check out http://www.tizag.com/javascriptT/javascriptprint.php

code in attached file:

[for some reason it does not seem to work in Opera, although Opera does support window.print()]

<html>
<head>
  <title> self-printing web page </title>
</head>
<body>
  self-printing page
  <div id="noprint" style="color: red; font-weight: bold; visibility: hidden;"> <h3>automatic printing is not supported by your browser</h3> </div>
  <script type="text/javascript">
<!--
if(window.print)window.print();
else document.getElementById('noprint').style.visibility = "visible";
//-->
</script>
</body>
</html>

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.