A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Using mailto with variables

  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    78

    Using mailto with variables

    Hi,

    I have been able to get the mailto protocol to work in an IPAQ with Win Mobile 5 and FlashLite 2.1.

    GetURL("mailto:info@xxxxxx.com?subject=Feedback&bo dy=xyz")

    However, I can't figure out how to add a variable into the body. The variable,
    deviceID, is gotten onLoad by fscommand2, status = fscommand2("GetDeviceID", "deviceID"), so deviceID is populated by a value.

    The challenge would be to write a script that includes the deviceID in the email's body. I've tried several scripts for adding deviceID, but none work.

    For example:
    GetURL("mailto:info@xxxxxx.com?subject=Feedback&bo dy="deviceID"") creates an error (too many "?) and using parentheses does not help. GetURL("mailto:info@xxxxxx.com?subject=Feedback&bo dy=<deviceID>") also doesn't add the value of the deviceID variable, just puts <deviceID> into the message's body.

    Is this possible: populating the email message's body with variables?
    If yes, I would much appreciate any scripting syntax suggestion to accomplish this. I'm stuck.

    Thanks.

    Kind Regards,

    saratogacoach
    Last edited by saratogacoach; 08-07-2009 at 02:25 PM.

  2. #2
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    I would suggest that you build the url as a string of a variable and pass the variable to GetURL.

    myurl = "mailto:info@xxxxxx.com?subject=Feedback&body=xyz" ;
    getURL(myurl);

  3. #3
    Member
    Join Date
    Dec 2007
    Posts
    78
    Hi,

    After some additional help, what seems to work is adding the variable after the " as a string item:

    GetURL("mailto:info@xyz.com?subject=Feedback&body= ID:" + deviceID)
    But, I can experiment with your suggestion. I'm interested in learning as much as I can about scripting.

    Thanks.

    Kind Regards,

    saratogacoach

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center