List Messages in ImapSmtp - Latest First

Hi Team,

Is there a way to get mails which are recieved latest rather than it searching mails from 1st mail onward.

@jani @mika

Thanks,
Devashish

There is very good post on listing mails by @aleantunes95 here.
It also has links to Robocorp documentations and authors github page.

2 Likes

Hi, List Messages returns a list, if I’m not wrong it comes from oldest to newest by default and I haven’t tried to change it, but due to it being a list you can do this:

Evaluate    ${my_messages}.reverse()

or with this Keyword from Collections:

Reverse List    ${my_messages}

Both ways should put the newest first.

Also, feel free to read the link @linkraivo sent, because I tried to order everything I could about searching with IMAP.

2 Likes