In my checkout page iam using
to take the screenshot of that page and i need to send this screenshot to mail of the user.
<button onclick="canvas();">Confirm order</button>
and script is:
function canvas(){
html2canvas(document.body, {
onrendered: function(canvas) {
document.body.appendChild(canvas);
},
width: 1200,
height: 700
}
)};
By using this image of the particular page is showing, but i need to send that particular image to mail of the user. How can i send that image in php code....
<?php
$Name = $_POST['Name'];
$phone= $_POST['phone'];
$formcontent=
"Name: $Name \n
Contact Number: $phone";
$recipient = "info@domain.com";
$subject = "xxxx";
$headers = 'From: '.$Name."\r\n".
'Cc: '.$Email."\r\n";
mail($recipient, $subject, $formcontent, $headers) or die("Error!");
?>
Can i give an id called $canvas in php code to send email. Pls give me suggestion.