Discussion:
move a mail from a folder to another
(too old to reply)
Patrick VanB
2017-03-28 12:57:19 UTC
Permalink
Raw Message
hello,

so, before have an answer for the IMAP connection, I go further.

I have to manage mails in an Exchange mailbox.
the next step is to move them from a folder to another.

I tried with an update connector, change the "mail.folder" attribute, but without success.

is there a way to do that ?

thanks
Eddie Hartman
2017-03-28 16:16:29 UTC
Permalink
Raw Message
Post by Patrick VanB
hello,
so, before have an answer for the IMAP connection, I go further.
I have to manage mails in an Exchange mailbox.
the next step is to move them from a folder to another.
I tried with an update connector, change the "mail.folder" attribute, but without success.
is there a way to do that ?
thanks
Have a Google for doing this using Java. If you can find examples there, these will either help you leverage a component in TDI, or even make the Java calls directly from your script.
John Dell'Oso
2017-03-28 22:41:20 UTC
Permalink
Raw Message
Post by Patrick VanB
hello,
so, before have an answer for the IMAP connection, I go further.
I have to manage mails in an Exchange mailbox.
the next step is to move them from a folder to another.
I tried with an update connector, change the "mail.folder" attribute, but without success.
is there a way to do that ?
thanks
Hi,

As a proof of concept (from 2 years ago) I set up a sample TDI application to iterate messages in a folder, do some processing based on the content of the message and then "archive" the message to another folder (I ended up using a MQ connector for the application - that's another story).

For the "archiving", I used a mailbox connector in "add" mode to place the message into a different folder. I then used a mailbox connector in "delete" mode to remove the message from the folder being iterated - trick with the delete operation is to set the connector to "initialize and terminate each time it is used".

Sounds a bit long-winded but it works.

Cheers,
JD
Patrick VanB
2017-03-29 08:29:34 UTC
Permalink
Raw Message
hello,

thank you for this idea. I tried this morning to do it (add and delete).
but, I cannot do the "add" (I'm really not use to the mail connector)

the error is with the mail.addMesssage attribute, I have a " mail.addMessageis not in appropriate format " error

do you have an example of mapping for this attribute ?
I didn't find any usefull information in the IBM docs....

thanks
Post by John Dell'Oso
Post by Patrick VanB
hello,
so, before have an answer for the IMAP connection, I go further.
I have to manage mails in an Exchange mailbox.
the next step is to move them from a folder to another.
I tried with an update connector, change the "mail.folder" attribute, but without success.
is there a way to do that ?
thanks
Hi,
As a proof of concept (from 2 years ago) I set up a sample TDI application to iterate messages in a folder, do some processing based on the content of the message and then "archive" the message to another folder (I ended up using a MQ connector for the application - that's another story).
For the "archiving", I used a mailbox connector in "add" mode to place the message into a different folder. I then used a mailbox connector in "delete" mode to remove the message from the folder being iterated - trick with the delete operation is to set the connector to "initialize and terminate each time it is used".
Sounds a bit long-winded but it works.
Cheers,
JD
John Dell'Oso
2017-03-29 23:27:24 UTC
Permalink
Raw Message
Post by Patrick VanB
hello,
thank you for this idea. I tried this morning to do it (add and delete).
but, I cannot do the "add" (I'm really not use to the mail connector)
the error is with the mail.addMesssage attribute, I have a " mail.addMessageis not in appropriate format " error
do you have an example of mapping for this attribute ?
I didn't find any usefull information in the IBM docs....
thanks
Post by John Dell'Oso
Post by Patrick VanB
hello,
so, before have an answer for the IMAP connection, I go further.
I have to manage mails in an Exchange mailbox.
the next step is to move them from a folder to another.
I tried with an update connector, change the "mail.folder" attribute, but without success.
is there a way to do that ?
thanks
Hi,
As a proof of concept (from 2 years ago) I set up a sample TDI application to iterate messages in a folder, do some processing based on the content of the message and then "archive" the message to another folder (I ended up using a MQ connector for the application - that's another story).
For the "archiving", I used a mailbox connector in "add" mode to place the message into a different folder. I then used a mailbox connector in "delete" mode to remove the message from the folder being iterated - trick with the delete operation is to set the connector to "initialize and terminate each time it is used".
Sounds a bit long-winded but it works.
Cheers,
JD
Hi,

For the mail.addMessage attribute I return mail.message - that is in the output map I do a return work["mail.message"]. Hope that fixes it.

For the connector in delete mode you just need to set up link criteria for the mail.messageid attribute.

Cheers,
JD
Patrick VanB
2017-03-30 11:05:16 UTC
Permalink
Raw Message
as simple as this !

thanks !
Post by John Dell'Oso
For the mail.addMessage attribute I return mail.message - that is in the output map I do a return work["mail.message"]. Hope that fixes it.
Loading...