[flexcoders] Re: mail from Flex

2006-07-27 Thread jf.saldanha
Thanks Steve

Your code work fine and dont need a JavaScript in a HTML shell page.

and thanks again for you and Brendan from the last post that give me a
diferent solucion.








--- In flexcoders@yahoogroups.com, Steve Cox [EMAIL PROTECTED] wrote:

 Try:
  
 mx:Script
 ![CDATA[ 
 public function executEmail(event:MouseEvent):void{ 
 var u:URLRequest = new URLRequest (mailto:[EMAIL PROTECTED]
 mailto:mail%40someone.com com);
 navigateToURL(u,_self); 
 }
 ]]
 /mx:Script
  
 Steve
  
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of jf.saldanha
 Sent: 26 July 2006 19:06
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] mail from Flex
  
 Hi FlexCoders
 
 I need some Help on this Issue, I try this to send Email from Flex:
 
 mx:Script
 ![CDATA[ 
 public function executEmail(event:MouseEvent):void{ 
 var u:URLRequest = new URLRequest (mailto:[EMAIL PROTECTED]
 mailto:mail%40someone.com com);
 navigateToURL(u); 
 }
 ]]
 /mx:Script
 
 mx:Button click=executEmail(event)/
 
 This work, open a default Email window but open a Browser window to.
 
 Need some Help Thanks
 
 jf.sal







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: mail from Flex

2006-07-26 Thread jf.saldanha
Thanks Brendan

Now is work fine, and that Flex code is good to try to send email to
PHP server in place of JavaScript.

Tanks again

jf.Sal












--- In flexcoders@yahoogroups.com, Brendan Meutzner [EMAIL PROTECTED]
wrote:

 You could call a JavaScript function in your shell HTML file to
acheive the
 functionality you're looking for...
 
 
 In your Flex app create/call a func like:
 
 public function emailViewURL():void
 {
 var functionName:String = emailURL;
 var to:String = [EMAIL PROTECTED];
 var subject:String = this is an e-mail subject;
 var subject:String = this is an e-mail body;
 
 var callResult:String = ExternalInterface.call(functionName,
 urlString, subject, body);
 }
 
 
 Inside your html add the following:
 
 script type=text/JavaScript language=JavaScript
 
 function emailURL(to, subject, body)
 {
 location.href = mailto:; + to + ?SUBJECT= + subject +
BODY= +
 body
 }
 
 /script
 
 That'll do what you're looking for.
 
 
 Brendan
 
 
 
 On 7/26/06, jf.saldanha [EMAIL PROTECTED] wrote:
 
Hi FlexCoders
 
  I need some Help on this Issue, I try this to send Email from Flex:
 
  mx:Script
  ![CDATA[
  public function executEmail(event:MouseEvent):void{
  var u:URLRequest = new URLRequest
(mailto:[EMAIL PROTECTED]mail%40someone.com
  );
  navigateToURL(u);
  }
  ]]
  /mx:Script
 
  mx:Button click=executEmail(event)/
 
  This work, open a default Email window but open a Browser window to.
 
  Need some Help Thanks
 
  jf.sal
 
   
 







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/