Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks
Try to build processing of incomming email and need to move processed imails from [Inbox] email folder to another email folder say [Processed]. Not local folders but email folders.
As I can see at the moment tPOP supports IMAP only for (marking for) deleting of emails which were retrieved from the server and saved into a local directory. So there is no visible way to handle moving processed imals between IMAP folders.
Meanwhile IMAP specification allows such actons and mayny libraries (Python etc) allow such manipulations.
So how it could be achieved? How most of TOS developers handle such tasks?
Any idea would be much appreciated!
Thanks and regards,
Alex
I already had to go Java way but building a complitelly new component would be overkill for me.
As for now I am surviving with the following tJava code:
System.out.println(message_tPOP_1.getClass().getName()); javax.mail.Message[] messages = new javax.mail.Message[]{ message_tPOP_1 }; javax.mail.Folder inbox = folder_tPOP_1; javax.mail.Folder processed = store_tPOP_1.getFolder("processed"); inbox.copyMessages(messages, processed);
First println displays "com.sun.mail.imap.IMAPFolder " which brings a hope of using .moveMessages(Message[] msgs, Folder folder) however the hope is false because of very strange situation when Talend throws compilation errors about unknown method:
The method moveMessages(Message[], Folder) is undefined for the type Folder
I have the same problem.
I have also to move mails from one folder to other.
Do you have already a solution for this issue?
Kind regards,