Is it possible to add a attachment to a mail with the mailto function in actionscript 3?

£可爱£侵袭症+ 提交于 2020-06-14 07:10:52

问题


Is it possible to add a attachment to a mail with the mailto function in actionscript 3? Thats the thing, i want to open the default mail program compose window with some data but i also need to add a file as attachment, and that file must be a screen capture of the app. Im doing some research and cant find nothing even close to this, someone have any ideas? All help will be appreciated because im really lost here. Thanks in advance ;)

Edit:

    public function onClickEmail(event:MouseEvent):void{
        var url:String = "mailto:juan@wncdevelopment.com?subject=Configurador&body=testing&attachment=C:\Users\Juan\Documents\AvoiderGame\test.bmp";
        var request:URLRequest = new URLRequest(url);
        try {
            navigateToURL(request, '_self');
        } catch (e:Error) {
            trace("Error occurred!");
        }
    }

That didnt worked :( it opens the mail client all info is ok but no file attached

2nd Edit:

Looks like the attachment=path/to/file dont work anymore in new email clients, i think it worked until outlook 97 then it was removed for security reasons and so now is imposible to do this anymore. Thanks for all the answers, Im selecting the N. Lucas answer because his answer was right, is just that it is no longer possible.


回答1:


From my understanding, using &attachment=file only works locally.

mailto:email@domain.com?subject=file&body=see+file&attachment=\\host\path\to\file

Where as

mailto:email@domain.com?subject=file&body=see+file&attachment=http://domain/file

does not work.




回答2:


mailto allows you to define the body of the email, so it is conceivable that you could embed a base64 encoded image. The problem is how to get the screenshot passed to it.



来源:https://stackoverflow.com/questions/3019547/is-it-possible-to-add-a-attachment-to-a-mail-with-the-mailto-function-in-actions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!