I have converted the contents of a canvas
element to data (URI Scheme) using toDataURL()
($contact_image_data
) and I want to send this
Yes it should be possible. Are you calling toDataURL() with the 'image/png' MIME type so it knows how to output it?
Try breaking your script into two components - make sure you really have a PNG then try mailing it.
For example, will test.png open on your computer when written?..
Hope that helps a bit!