Skip navigation
Currently Being Moderated

mailto: with Attachement from Flex

Aug 20, 2009 11:39 PM

Hi There,

 

I'm trying to launch the user's e-mail and automatically embed an attachement:

 

What I'm trying is:

 

         var src:String = "mailto:test@test.com&subject=test_subject&body=testBody&attachment=assets/test.gif";
           var urlReq:URLRequest = new URLRequest(src);
          navigateToURL(urlReq, "_self");

 

 

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\"

 

Thanks,

Tim

 
Replies
  • Currently Being Moderated
    Aug 21, 2009 12:58 AM   in reply to Tim Goodman

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 21, 2009 6:49 AM   in reply to Tim Goodman

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2012 10:06 AM   in reply to Tim Goodman

    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.

     

    http://flex.coltware.com/tag/smtp/

     

    That is his blog with useful examples.

    Actual downlable code is on Google code

    http://code.google.com/p/airxmail/downloads/list

     

    And I found another great SMTP example library that handles attachments now with examples at

    http://www.bytearray.org/?p=27

     

    Message was edited by: DonMitchinson Added additional SMTP urls

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2012 5:08 PM   in reply to Tim Goodman

    Didn't realize it was that old!

     

    Just saw in the right hand column of related questions when I was replying to a similar one.

     

    Don

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 7, 2013 3:02 AM   in reply to Tim Goodman

    Even i tried a lot. but no lead. i dont want to use server thing for attachments. Anyone ther please help

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 7, 2013 9:32 AM   in reply to rohantilekar

    Does the mailto: spec support attachments?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 25, 2013 2:30 PM   in reply to Flex harUI

    NO mailto does not support attachments.

     

    DonMitchinson. Thanks for the hint on coltware. Do you know if using this library we can create a mail using client default mail as outlook ?

     

    Thanks,

    Rafael

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 25, 2013 6:57 PM   in reply to Aaron7689

    I do not know  - give it a shot and report back

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points