I’ve tried:
var fn:String = "image.png";
var f:File = File.applicationStorageDirectory.resolvePath(fn);
var subject:String = "My encrypted Image";
var body:String = "<html><head><body><img src=\""+f.url+"\"></body></head></html>";
var url:String = "mailto:?subject="+subject+"&body=" + body;
navigateToURL( new URLRequest( url ), '_self' );
This does launch the Mail app but it displays a “?” icon, which means it can’t find my full app-storage path.
Any ideas?
Thanks
I found a solution:
instead of putting the file path, put a Base64 encoded string of the image, for example:
More info:
http://en.wikipedia.org/wiki/Data_URI_scheme
To convert from ByteArray to Base64:
http://www.lorenzgames.com/blog/convert-an-image-to-base64-string-and-vice-versa