0

Hi,

I am working in php a mail function in this function in message part i want to use one print button which should be mailed to and if who is getting mail want to print this page that should be print. But which code i am using for print button in message that is not working well.

So please help me . How i can do this if there is any other code or help ??

here is code which i am using like this:

<?php

$to="mymail@gmail.com";
$subject="Test Mail";
$message="Hi this is test mail."
$message.="<input type=button value=Print onClick=window.print()>";
$from="test@gmail.com";
mail($to,$subject,$message,$from); 
?>

But in this case button Print is not working well.
Please help me to how i can do this in mail message .

Thanks,
Kparas

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by phpbeginners
0

if sending html you need to change the header of your email.

$from  = 'MIME-Version: 1.0' . "\r\n";
$from .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$from .="test@gmail.com";
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.