Here's an idea.... Here are some assumptions: 1) a user sets this up to happen, so the setting is in a db or some other persistent storage. 2) you are relying on some part of Flex to generate the image you are trying to send
Ok, so you have a cron job or windows task that requests a url on the local machine. the url is a simplified version of the flex app that only does a query for the specific reports that need to be run and it creates all the reports and emails them out. I say local machine because you won't want this on a public server since it cannot have any reasonable security on it. You could however get more complex and use a HttpClient within your job or task that does support authentication then it could be a public server. In any case you will probably need a browser to run the process because I don't think there are any interpreters that can run without the Flash Player and the Flash Player will at the very least need to be running on a windowed system, ie X windows, Windows or Mac OSX, it cannot run on a headless system. Not sure if that makes sense. What exactly does the report look like? Can't you generate it on the server using php, java, ruby or Fortran or something? Paul --- In [email protected], "Karl Johnson" <[EMAIL PROTECTED]> wrote: > > This definitely sounds like something that should be done on the server side and not done using a client side application. How are you sending the emails now from the flex app? Calling a php app that creates the mail and sends it via SMTP? If so, then why not just put the automated job logic in that layer? > > If you absolutely have to do it in flex, I suppose you could doing something like have a windows task (not sure what OS you are using) exceute every night which kicks off the swf or the flex app and flash player embedded into an exe. Or you could just leave the flash player running with your flex app and use a timer in AS. Neither are very great solutions though, given that the flash player is a client side player :-) > > Karl > > Cynergy > > ________________________________ > > From: [email protected] on behalf of tyriker > Sent: Mon 2/19/2007 11:27 AM > To: [email protected] > Subject: [flexcoders] Automated Email Reports with Flex > > > > We've built a Flex app to read XML data from an HTTPService, and > display the data as a report (a table or some sort of chart) to the > user. From within the app, the user can email the report to someone, > (we use the method of converting the Flex components to an image, and > then building an HTML file with the images embedded, and sending the > user an HTML email). > > The problem we've come up against is how to automate and email such > reports (like on a nightly basis). With automation, there won't be a > 'client-side' or browser to load the Flex app into to generate the > tables/graphs. > > Is there a solution for this, or essentially, a way to run a > Flash/Flex app without involving a user/browser? Any command-line Flex > interpreters, or anything in PHP or another server-side language that > can 'trigger' a Flex app? Thanks. >

