[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: imap client
- From: Alexey Melnichuk <mimir@...>
- Date: Tue, 30 Jul 2013 12:53:53 +0400
> I want to write a script to log into my gmail account via imap, search for a specific message (based on the subject and date) and download and untar the attachment from that message (there will only be one for each day). Can this be easily done in lua? Can someone point me to an example?
Recently i play with imap4.lua and my pop3.message library.
You can retrieve rfc822 message using IMAP fetch command and then parse message.
I never use imap4.lua in real work so may be there has better library.
for _,v in pairs(connection:fetch("(RFC822)") do
local msg = assert(pop3.message(v.RFC822))
for i,body in ipairs(msg:attachments()) do