What are the odds to create an app to connect to and query
an email server using IMAP protocol in APMS (LUA5)?
(Excange server to be more precise...)
Professional Software Development Tools
What are the odds to create an app to connect to and query
an email server using IMAP protocol in APMS (LUA5)?
(Excange server to be more precise...)
Never know what life is gonna throw at you.
(Based on a true story.)
Hi Bule,
I worked on a project a few months ago that did exactly what you were trying to do. I originally planned on it being coded in AMS, but it turned out to be a headache. Lua doesn't natively have support for the IMAP protocol and writing functions for every IMAP command would be a pain. I ended up just writing something in perl and was done with it.
That being said, check out LuaSocket. That may be a good direction to start if you still want to do it in AMS. IMAPFilter also uses the Lua language for configuration, so it might be useful. You can also open a telnet session to an IMAP server using the IMAP port, and send raw IMAP commands to do the job (it was my original approach, but couldn't find anything helpful for lua & telnet). Take a look at the IMAP RFC here - http://www.faqs.org/rfcs/rfc2060.html
I'm pretty experienced with IMAP, so feel free to hit me up if you have any questions!