Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

IMAP4 Inbound message 10 months 1 week ago #19579

I have set up a basic transformation that reads an IMAP4 mailbox folder, and maps some of the message fields to some fields in a database table. This works well when running manually.

I want to use the IMAP4 Mailbox monitor to trigger the process and to delete the message if the transformation works. So I created a PACKAGE with the first step being to RECEIVE IMAP4 MESSAGE and then it calls the transformation I wrote.

HOWEVER, when testing (as I have not yet implemented the monitor), the PACKAGE ACTION to read the message does so and then it DELETES the message. The action then calls the TRANSFORMATION which has a IMAP4 READER mentioned above. But because the first step of the package reads the message and deletes it, then there is no message for the transformation reader to get as it has been deleted.

Therefore, how am I meant to

1. Monitor for at least 1 new Mail Message (Kind of know this)
2. Fire off a Package that reads each message
3. Transforms the message
4. Writes it to the DB
5. DELETES if from the MailBox

I can see that the monitor can Fire off a Transformation rather than a Package. But a Transformation can't delete the mail message after it has been written. So I am not sure how I get the READ MAILBOX, WRITE TO DATABASE, DELETE MESSAGE loop happening for each message it finds in the Mailbox

Keep in mind that the mail message BODY is being used not any attachments as the content I need is in the body of the message.

Thanks in advance

Please Log in or Create an account to join the conversation.

IMAP4 Inbound message 10 months 1 week ago #19580

  • admin
  • admin's Avatar
  • Offline
  • Moderator
  • Moderator
  • Deeds not Words
  • Posts: 7914
  • Karma: 33
  • Thank you received: 489
Instead of deleting the message you can move it into a different folder.
1) The package reads the message and moves into the "Processed" folder.
2) Transformation reads the message from the Processed folder and deletes it.

You may insist on "READ MAILBOX, WRITE TO DATABASE, DELETE MESSAGE" loop.
We did try to implement it in past and found it impossible to make it work correctly.
If "write to the database" step takes a very long time to complete, you may end up on deleting the wrong message.
So it is better to move the message to a different folder immediately.

Mike
Attachments:

Please Log in or Create an account to join the conversation.

IMAP4 Inbound message 10 months 1 week ago #19582

Thanks. However, your suggestion is

Instead of deleting the message you can move it into a different folder.
1) The package reads the message and moves into the "Processed" folder.
2) Transformation reads the message from the Processed folder and deletes it.


But I can't see where a TRANSFORMATON can DELETE the message.

Please Log in or Create an account to join the conversation.

IMAP4 Inbound message 10 months 1 week ago #19583

  • admin
  • admin's Avatar
  • Offline
  • Moderator
  • Moderator
  • Deeds not Words
  • Posts: 7914
  • Karma: 33
  • Thank you received: 489
You are right there is no such option at the moment.
We will add it to the Reader for you.

(Meantime you can use package object for it)
Mike

Please Log in or Create an account to join the conversation.

IMAP4 Inbound message 10 months 1 week ago #19584

Thanks. I think that would be a good feature to have. However, I must be still missing something.

1. The PACKAGE runs and MOVES the message to another Folder
2. The PACKAGE then calls the TRANSFORMATION
3. The TRANSFORMATION creates a Database Row
4. Then What?

The TRANSFORMATION can't currently do anything. So the same PACKAGE regains control. But it can't know what messages the TRANSFORMATIOn dealt with unless it deals with a single message and passes a MESSAGE ID around somehow.

If I have the first STEP in the PACKAGE being the TRANSFORMATION and then the PACKAGE has a final ACTION of MOVING the messages this also doesn't make sense to me as the set of MESSAGES may be different between the two steps.

Sorry for missing the obvious.

Cheers

Please Log in or Create an account to join the conversation.

IMAP4 Inbound message 10 months 1 week ago #19586

  • admin
  • admin's Avatar
  • Offline
  • Moderator
  • Moderator
  • Deeds not Words
  • Posts: 7914
  • Karma: 33
  • Thank you received: 489
How about that





Mike
Attachments:
The following user(s) said Thank You: bruce.gibbins

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2

We have 163 guests and no members online