• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help with Mailto:

Participant ,
Nov 09, 2010 Nov 09, 2010

Copy link to clipboard

Copied

I am using the following code to open my client email program and I want the address, subject field and body text completed.

submit_btn.addEventListener(MouseEvent.CLICK, sendMessage);

var subject="My Subject"
var body="This is text. This is text. This is text. This is text. This is text. This is text. "
var to="me@address.net"


function sendMessage(event:MouseEvent):void {
var email:URLRequest = new URLRequest("mailto:"+to+"?subject=" +subject+ "&body="+body);
navigateToURL(email, "_self");
}

The problem is no matter what I have tried I cannot get the subject and body text to show any text. The email client open and the correct address is shown. Is this a problem with trying to run it locally and not from server or is there a problem with the code? I'd really appreciate any help with this. Thanks.

TOPICS
ActionScript

Views

767

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 09, 2010 Nov 09, 2010

Your code looks fine.  It is always best to test email-related functionality on a server, and often html page functionality as well.

Votes

Translate

Translate
LEGEND ,
Nov 09, 2010 Nov 09, 2010

Copy link to clipboard

Copied

Your code looks fine.  It is always best to test email-related functionality on a server, and often html page functionality as well.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 09, 2010 Nov 09, 2010

Copy link to clipboard

Copied

Thanks for taking a look. I found the problem. I am doing this for an eLearning program

and that program does not use AS3. I have done it

in AS2 (getURL) and it works fine. 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 09, 2010 Nov 09, 2010

Copy link to clipboard

Copied

You're welcome.  Odd that you didn't realize that since it is a learning program.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 09, 2010 Nov 09, 2010

Copy link to clipboard

Copied

LATEST

Yes, just learning all the quirks of the new authoring program. But thanks

for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines