I have run into some problems with emailing a file from flex. I currently use the code below. If bodyVar is fewer than 1967 then the email is populated fine. When i call this code an Outlook message opens containing whatever is in bodyVar. If it is more than 1967 then it opens with a blank page.
var mailMsg:URLRequest = new URLRequest("mailto:");
var variables:URLVariables = new URLVariables();
variables.subject = subVar;
variables.body = bodyVar;
mailMsg.data = variables;
mailMsg.method = URLRequestMethod.GET;
navigateToURL(mailMsg, "_self");
I am using Firefox and I presume this 1967 is coming from that. If I used IE then the email does not even open.
Does anyone know of a way of sending an email in flex which allows me to send a lot of text? I am not bothered by formatting or images etc. I just need to be able to send text
Thanks
EDIT
I have just found this bit of code that shows another way without using URLVariables object. I presume the limitation here is in http
var s:String = "";
s += "mailto:";
s+= sendTo.text;
s+= "?";
s+= "subject=";
s+= subjectVar;
s+= "&";
s+= "body=";
s+= bodyVar;
navigateToURL(new URLRequest(s));
EDIT 2 To be clear I want to open a new email message using the user's email client. So if they have outlook installed I would like an Outlook msg opened containing text that should be sent.