-
AS3 Email with subject and body [SOLVED]
shareBtn.addEventListener(MouseEvent.CLICK, onShare);
function onShare(event: MouseEvent) {
var request:URLRequest = new URLRequest("mailto:emaila address"+"?subject=Subject of email"+"?body=Body of email);
navigateToURL(request, "_self");
}
I'm trying to populate all the fields of an email, but I can only send info to two of them. If I send all three pieces of info the Subject ends up "Subject of email?body=Body of email", but if I ditch either the subject or body the other fields populate correctly. Any ideas why all three can't be populated?
Cheers
Last edited by darngooddesign; 01-13-2009 at 05:32 PM.
-
The "?" is only used to start the parameter portion of a URL. Parameters are delimited with &.
Code:
var request:URLRequest = new URLRequest("mailto:emaila address"+"?subject=Subject of email"+"&body=Body of email);
You may also need to URLEncode those to turn spaces into %20, etc.
-
Thank you sir, that did it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|