Hello Rohit, There is no direct API in flex which support email feature. You need to handle it using some server side scripting language.
What Jagdish suggest you the approach to send data needed in your email. server side technolgy will send the email with the information provided by user (as in Jagdish example "ob") Also, for attachment you can browse the file need to be attached in flex and send the path of the file in and object. The server side technology will pick the path from object, like other properties and do the needful. That holds good as far as flex side is concerned. On server side, you can use anything php, jsp..and any plugin or api provided for that technolgy as Manikandan suggest one of them i.e JavaMail. That API will do the needful to send the email. Let us know if you face any difficulty in implementing this. Thanks, Shaleen Jain http://shaleenjain.blogspot.com On Jan 15, 7:15 pm, "Jagadish M" <[email protected]> wrote: > Hi Rohit, > > I'm sending the code for sending mail using serverside code (PHP) but > without any attachment. > go through the code it may help full to you.. > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> > <mx:HTTPService url="http://hemadri.info/sendmail.php" id="srv" > result="res(event)" fault="flevent(event)"/> > <mx:Form> > <mx:FormHeading label="Sending Mail"/> > <mx:FormItem label="E-Mail"> > <mx:TextInput id="tiemail"/> > </mx:FormItem> > <mx:FormItem label="Message"> > <mx:TextInput id="timsg"/> > </mx:FormItem> > </mx:Form> > <mx:Button label="Send Mail" click="sendsrv()"/> > <mx:Script> > <![CDATA[ > import mx.rpc.events.FaultEvent; > import mx.rpc.events.ResultEvent; > import mx.controls.Alert; > private function res(e:ResultEvent) > { > Alert.show("Mail sent Successfully"); > } > private function flevent(f:FaultEvent) > { > Alert.show('fault '+f.fault.toString()); > } > private function sendsrv() > { > var ob:Object=new Object; > ob.email=tiemail.text; > ob.message=timsg.text; > srv.send(ob); > } > ]]> > </mx:Script> > </mx:Application> > > -- > Thanks & Regards, > > Jagan Mady's > > http://flexnflex.wordpress.com/http://snippets.dzone.com/user/mjcprasad2000/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

