I'm trying to launch the user's e-mail and automatically embed an attachement:
What I'm trying is:
var src:String = "mailto:firstname.lastname@example.org&subject=test_subject&body=testBody&attachment=assets/test.gif";
var urlReq:URLRequest = new URLRequest(src);
assets/test.gif is a subfolder to the html hosting the swf
The e-mail launches - but there is no attachment. Is there something I can do to access the file? I have also tried surrounding the attachment filename in double quotes - e.g. attachment=\"assets/test.gif\"
your link launched the new email wizzard of email client installed in your computer, but your file is located in the webserver root.
this is not solution, but for the test you could do "C:\test.gif".
if you want to send automated emails, you could use the server script.
Flex simply does not allow for what you are trying to do. You need to upload files to the server and send the email via PHP, etc.
If this post answers your question or helps, please mark it as such.
I believe it's possible but not the way you're trying - only if you want to use smtp.
That brings up other issues - but I believe it's the only way.
I think some people have tried this and even set up libraries
and sample Actionscript code to demo its use.
Coltware - has some example code (AirXmail) - I've never tried but it looks doable.
That is his blog with useful examples.
Actual downlable code is on Google code
And I found another great SMTP example library that handles attachments now with examples at
Message was edited by: DonMitchinson Added additional SMTP urls
Wow, a reply over 2 1/2 years after my original question. Thanks very much for the time - to be honest, I can't even remember the app exactly that I was trying to do this in!
I'll mark it as a helpful answer :-)