Send proudct image to a mail address

Modified on Mon, 19 Dec 2022 at 03:42 PM

You find a PHP script in the source folder, which will send an image to a custom mail address. In the PHP file you set also the sender mail address, recipient mail address, subject and mail text.   

//send data url to php script when clicking on a custom element
$('#save-image-php').click(function() {
	thsirtDesigner.getProductDataURL(function(dataURL) {
		
		$.post("php/send_image_via_mail.php", { base64_image: thsirtDesigner.getProductDataURL() }, function(data) {
	        if(data) {
	            console.log("Mail successfully sent!");
	        }
	        else {            
	 console.log("Mail could not be sent!");
	        }
	    });
		
	});
   
});		     

   

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article