MAPIEx - Loop through emails
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-03-17 08:18 PM
Hi,
When I use the "Get Mail" Action I am only able to retrieve the most recent email in the inbox.
Is there any way to loop through the emails in the inbox using the MAPIEx object?
Any help is appreciated, thanks.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-03-17 04:41 PM
I built a background email processing process once - it uses Get Email to get the next email, do some validation to ensure it was a valid request, and then added that email to the work queue before getting the next email. Invalid emails were moved to an invalid email sub-folder, valid emails were moved to a loaded sub-folder. Each process that was fed via email requests had its own mailbox.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-03-17 07:54 PM
Hi Denis, I appreciate the feedback.
This is exactly what I want to do, process the email and add it to a work queue but how were you able to achieve ""Getting the next email"". When I run the Get Mail action multiple times, I would only be retrieving the same (most recent) email. Was it because you moved the emails to a separate folder? Is there any way to do this without moving the emails.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
29-03-17 07:23 PM
Yes - Processed emails should be moved into a sub folder called something like 'Loaded' - otherwise your mailbox polling logic would be very inefficient as it constantly reads in emails it has already loaded and checks the work queue for duplicates. Also, anyone looking at that mailbox would have no idea what has been loaded into Blue Prism and what has not been.
