Save e-mail to local file
private function handleMessage(event:IMessageEvent):void{

 var msg:MimeMessage = event.getMimeMessage();
 var file:File = File.desktopDirectory.resolvePath("mail_" + msg.messageId + ".eml");

 var fs:FileStream = new FileStream();
 fs.open(file,FileMode.WRITE);
 fs.writeBytes(event.source);
 fs.close();
}
Re-parse and make MimeMessage from local file

The following example is required v0.7 or more.


// var dir:File = File.someDirectoryYouWantToUse

var list:Array = dir.getDirectoryListing();
var length:int = list.length;
for(var i:int = 0; idownload airxmail

Related Posts

2 Responses to “airxmail: How to save e-mail to local file and re-parse the data”

Leave a Reply

Spam protection by WP Captcha-Free

RSS
Add to Google
2011年4月
« 2月   5月 »
 12
3456789
10111213141516
17181920212223
24252627282930