Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- General settings, these were there...
- options.timeout = 120
- options.subscribe = true
- -- Configure imap account FROM which new messages are taken
- account1 = IMAP {
- server = 'imap.domain1.com',
- username = 'username1',
- password = 'password1',
- ssl = 'ssl3',
- }
- -- Configure imap account TO receive new messages
- account2 = IMAP {
- server = 'imap.domain2.com',
- username = 'username2',
- password = 'password2',
- ssl = 'ssl3',
- }
- -- Fetches all unread messages from account1
- results = account1.INBOX:is_unseen()
- -- First copy messages under a TAG that I want them under, filter e.g. a Gmail is not always sufficient
- results:copy_messages(account2['Folder/Tag'])
- -- Copy message to inbox
- results:copy_messages(account2.INBOX)
- -- Mark messages as seen so that they are not copied multiple times
- results:mark_seen()
Add Comment
Please, Sign In to add comment