Solved

mailto: populating the body from flash getURL() in a clients apple email

Posted on 2008-10-24
2
1,137 Views
Last Modified: 2013-11-11
have a flash form and the client want to do it the simple way ...

here is the code
for some reason it's not populating the body ( email and subject show up fine)


var mySubject:String ="Coremetrics Intelligent Offer calculated an increase in my site revenue!";
 
var Body:String= "Hi there  I just took the Coremetrics Intelligent Offer Revenue Calculator and my results were amazing. Thought youd like to take it too!";
 
txtSubject.text = mySubject;
txtBody.text = Body;
sendButton.onPress = function(){
	to = email1.text;
	subject = String(txtSubject.text);
	 myBody= String(txtBody.text);
	url = "\n\nCheck it out here.\n\nhttp://www.coremetricsintelligentoffer.com/"
	if (txtBody.text == Body) {
		trace("yee");
		myUrl = "mailTo:"+to+"?subject="+subject+"&body=Hi there  I just took the Coremetrics Intelligent Offer Revenue Calculator and my results were amazing. Thought youd like to take it too!\n\n"+url; 
			trace("yee"+myUrl);
			getURL(myUrl); //Hi there  I just took the Coremetrics Intelligent Offer Revenue Calculator and my results were amazing. Thought youd like to take it too!");
 
	 } else {
		
		getURL("mailTo:"+to+"?subject="+subject+"&body="+Body+"\n\n"+Body+url);
	}
	
	prevFrame();
};
 
/*txtSubject.onSetFocus = function(oldFocus:Object) {
	if (txtSubject.text == mySubject) {
		txtSubject.text = "";
		txtSubject.condenseWhite = true;
	}
};
*/
txtBody.onSetFocus = function(oldFocus:Object) {
	if (txtBody.text == Body) {
		txtBody.text = "Hi there  I just took the Coremetrics Intelligent Offer Revenue Calculator and my results were amazing. Thought youd like to take it too!";
		//txtBody.condenseWhite = true;
	}
};

Open in new window

0
Comment
Question by:meezyart
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 250 total points
ID: 22801777
try following code in a new FLA's first frame and you will see that it will work like charm:
//----------------------
var to ="test@test.com";
var subject ="this is mail subject";
var body="Hi there !! I just took the Coremetrics Intelligent Offer Revenue Calculator and my results were amazing. Thought you'd like to take it too!\n\n";
var url ="http://someurl.com";            
                  
getURL("mailTo:"+to+"?subject="+subject+"&body="+body+"\n\n"+url);
//------------------------

problem in your code is few characters like:

    (Hi there  I just )
  (Thought youd like )

these characters are not standard escaped character and seems like you have copy/paste it through MS word,  I hope things will get sorted for you now
0
 

Author Closing Comment

by:meezyart
ID: 31509896
THANK YOU
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ransomware continues to be a growing problem for both personal and business users alike and Antivirus companies are still struggling to find a reliable way to protect you from this dangerous threat.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question