4 Replies Latest reply on Jul 17, 2006 7:49 AM by ufitzi

    New Line - mailto:

    ufitzi Level 1
      I'm using the getURL() method to open a new email message window for the user.
      This works fine, creating the email window w/ pre-filled subject and body values, but I need to insert new lines to seperate a few fields.
      I've tried \n, \r, and newline, none of which are working for me. Here's my current code
      getURL("mailto:info@example.com?subject=SUBJECT&body=Your Name:\nYour Business:");
      Any ideas?
      I've wasted too much time on this seemingly simple task.
      It really makes the email look like crap, though!

        • 1. Re: New Line - mailto:
          ufitzi Level 1
          Found my answer on http://ActionScript.org forums.
          Including a "%0A" in your string text forces a line break once the email window is opened. In Outlook Express, if I view the source, the "%0A"s have been converted to <br> tags.
          What a pain! I wasted at least 3 hours on this!

          • 2. Re: New Line - mailto:
            Hi ufitzi,

            I'm having the same mailto: problem in Flash 8. I'm trying to find the answer you said was on http://ActionScript.org, but I can't locate it. Could you point me to that? And did it actually solve the problem?

            I'm new to scripting, so some of this is all greek to me.

            • 3. Re: New Line - mailto:
              dave8952 Level 1
              Sorry, I should have mentioned that my real problem is the "cc", "subject" & "body" lines never appearing in the email. The "mailto:" does work, but only the recipient field gets filled, the others do not.

              • 4. Re: New Line - mailto:
                ufitzi Level 1
                Make sure you use the following syntax:
                "mailto:user@domain.com?subject=YOur Subject&body=some text copy for the body&cc=&bcc="

                I'm not sure about the CC or BCC fileds, but my gues is you would use CC=account@ddd.com, etc..
                Remember to seperate each variable=value pair with an ampersand

                Play around with the mailto tag using ?HTML <a> links first, and once you get the desired result you should be avle to copy/paste into flash script.
                Also, you're using getURL(), correct?
                In FLash, the code should look like :
                "getURL("mailto:user@domain.com?subject=YOur Subject&body=some text copy for the body&cc=&bcc=");

                Hope this helps!