6 Replies Latest reply on Aug 18, 2010 5:42 AM by prethi.flex

    AIR EmailClient

    prethi.flex Level 1

      Hi All,

       

       

           I have to develop AIR Email Client,it has to communicate with server.

       

           I am using URLRequest to sending the request and getting back the session id and cadata.

           Problem is am not able to get the inbox data in xml format.

       

           Is there any other way to communicate with server to fetch the inbox data.

       

           Any help is really appreciated,

       

           Thanks in advance.

        • 1. Re: AIR EmailClient
          prethi.flex Level 1

          Any one help me.

          • 2. Re: AIR EmailClient
            thilgen Level 4

            Check out ShareFire

             

            http://www.sharefirereader.com/

             

            http://blogs.adobe.com/air/2009/02/share_news_with_sharefire.html

             

            http://code.google.com/p/apprise/

             

            This is an open source email client written in AIR that has support for "Gmail, Yahoo, Hotmail, or your default email client"

             

            Hope this helps.

             

            Chris Thilgen

            AIR Engineering

            • 3. Re: AIR EmailClient
              chris.campbell Adobe Employee

              Moved discussion to the Adobe AIR Development forum

              • 4. Re: AIR EmailClient
                prethi.flex Level 1

                Thanks Chris,

                 

                 

                 

                          AIR Email Client should  communicate with mail server.It's a https communication so it needs certificate authentication.

                          In Flex there is no support for webdav protocol. Its not supporting webdav methods.Am using URLrequest to communicating with mail server.

                 

                 

                         [I have to communicate with mail server and fetch the inbox data as xml.]

                 

                          please help me to solve this issue.

                • 5. Re: AIR EmailClient
                  thilgen Level 4

                  HTTPS communication is supported in all the ActionScript networking classes...does that help?

                   

                  I am afraid I do not know enough about the problem you are trying to solve to give you much additional guidance...

                   

                  perhaps others here on the forums might be able to provide some implementation suggestions?

                   

                  Thanks,

                   

                  Chris Thilgen

                  AIR Engineering

                  • 6. Re: AIR EmailClient
                    prethi.flex Level 1


                    Hi,

                    Thanks for the help.

                     

                    Actually My requirement is.. I have to create a mail client as MS Outlook using AIR. The instruction given to me is.. I should not use any back-end server like PHP or ColdFusion or Java. AIR application should directly communicate with Mail Server and get the mail details(calender, contacts, inbox..etc). Is there any article, blogs, tutorials with code hint for the AIR Mail Client? Is it Possible to connect to mail server directly from AIR Application without any back-end server?

                     

                    Note:

                     

                    I cannot able to run the application that you gave me. I can compile it successfully but unable to run it. its not doing anything.  can you please assist me  to run that application..?

                     

                    i have to form the request as 2.3.3 example given in below link.

                    http://www.webdav.org/specs/rfc5323.html.

                     

                     

                    Code

                     

                    private function tryLoad():void

                    {

                         var urlreq:URLRequest=new URLRequest();

                         var vars:URLVariables=new URLVariables();

                     

                         urlreq.url="https://server/exchweb/bin/auth/owaauth.dll";

                         urlreq.manageCookies=true;

                         urlreq.followRedirects=true;

                         vars.username="username";

                         vars.password="password";

                         vars.destination="https://server/exchange/username";

                         vars.flags="0";

                         vars.SubmitCreds="Log+On";

                         vars.forcedownlevel="0";

                         vars.trusted="0";

                         urlreq.data=vars;


                         urlreq.method="POST";

                         var loader:URLLoader=new URLLoader();

                         loader.load(urlreq);

                         loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, fnHeadLoader);//getting cookie from this response


                    }


                    private function fetchInbox():void

                    {

                         var strQuery:String;

                         var strCookie:String;

                         var strcadata:String;

                         var loader:URLLoader=new URLLoader();   

                         var vars:URLVariables=new URLVariables();

                     

                              strQuery="<?xml version=\"1.0\"?><D:searchrequest xmlns:D = \"DAV:\">" + "<D:sql>SELECT \"urn:schemas:httpmail:sendername\"                ,      \"urn:schemas:httpmail:subject\"," + " \"urn:schemas:mailheader:from\", \"urn:schemas:httpmail:datereceived\" ," + "                           \"urn:schemas:httpmail:date\", \"urn:schemas:httpmail:textdescription\" ," + "\"urn:schemas:httpmail:htmldescription\" ," + "                \"DAV:id\"" + ", \"DAV:href\"" + ", \"urn:schemas:httpmail:hasattachment\"" + ", \"urn:schemas:httpmail:read\"" + ",                \"urn:schemas:httpmail:attachmentfilename\"" + ", \"urn:schemas:httpmail:to\"" + ", \"urn:schemas:httpmail:priority\"" + ",                \"urn:schemas:httpmail:importance\"" + ", \"urn:schemas:httpmail:cc\"" + ", \"urn:schemas:httpmail:bcc\"" + " FROM \"" +                "https://server/Exchange/username/Inbox" + "\"" + " WHERE \"DAV:ishidden\" = false AND \"DAV:isfolder\" = false" + " AND                \"urn:schemas:httpmail:datereceived\" &gt; CAST(\"" + "2010-08-11" + "\" as 'dateTime.tz')" + " ORDER BY                \"urn:schemas:httpmail:datereceived\" ASC" + " </D:sql></D:searchrequest>";

                     

                         var header3:URLRequestHeader=new URLRequestHeader("Cookie", strCookie + ";" + strcadata);

                         var header2:URLRequestHeader=new URLRequestHeader("Content-Type", "application/xml");

                          var  header1:URLRequestHeader = new URLRequestHeader("Authorization","Basic " + credentials);

                         vars.destination="https://server/exchange/username/Inbox/";

                     

                         urlreq.method="SEARCH";

                     

                         urlreq.requestHeaders.push(header1);

                         urlreq.requestHeaders.push(header3);

                         urlreq.requestHeaders.push(header2);

                     

                         urlreq.data=vars+strQuery;

                         loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, searchEvent); //getting blank data

                         try

                         {

                              loader.load(urlreq);

                         }

                         catch (e:Error)

                         {

                              Alert.show("unable to Load");

                         }

                    }

                     

                     

                    Please help me to solve this issue.