I'm trying to make a phpmailer that when printed applies a style, mostly font size, to get all of it to fit on a standard piece of printer paper. But when in gmail and selecting print I can't get the style to be applied.
 $mail->Body="
 <?php
 <!DOCTYPE html>
 <html>
 <head>
<title>test email</title>
<style>
h1 {
color: maroon;
font-size: 10px;
}
@media print { 
h1 {
color: maroon;
font-size: 10px;
}
}
</style>
</head>
<body>
<h1>html EMAIL IS COMING SARA</h1>
</body>
</html> 
";
I have tried it this way but the email wont send at all. I recieve the following:
PHP Parse error:  syntax error, unexpected 'color' (T_STRING)
$mail->Body="
<?php
 <!DOCTYPE html>
<html>
<head>
<title>test email</title>
</head>
<body>
<h1 style="color:blue;">html EMAIL IS COMING SARA</h1> 
</body>
</html> 
 ";
 
     
    