How to get IMAP mail message filtered by subject and retrieve the content to be used for "type into"

Purpose: get IMAP mail message filtered by subject, then retrieve the content (a form submission with 5 items) to be used for “type into” activities.
Flowchart planed: Get IMAP Mail Messages > For Each > Flow Decision > True: Sequence for “type into” activities / False: loop back to Get IMAP Mail Messages
For Each: ForEach item in mail > If Condition: item.Subject.Contains(“newFormSubmission”)
Leaned this from Unable to store all gmail emails into List<MailMessages> variable @Manjuts90 but got the error "Subject is not member of System.Collections.Generic.List(OfSystem.Net.Mail.MailMessage)

Can some one help me with this puzzle, thanks

@MubieSam_Lin

update UIPath.Mail.Activities package and then try once.

@lakshman My UIPath.Mail.Activities version is 1.5.1 “Update” button is disabled.

1 Like

Hi
Kindly Make sure that the TYPE ARGUMENT property of FOR EACH loop is set with
System.Net.Mail.MailMessage

Cheers @MubieSam_Lin

4 Likes

@Palaniyappan Yes, TYPE ARGUMENT property of FOR EACH loop is set with
System.Net.Mail.MailMessage

it should be just System.Net.Mail.MailMessage and not
System.Collections.Generic.List(OfSystem.Net.Mail.MailMessage)
Kindly check that once

Cheers @MubieSam_Lin

1 Like

@Palaniyappan This is difficult for a beginner to know the difference, but it works, thanks!
For the 2nd part of my purpose “retrieve the content (a form submission with 5 items) to be used for “type into” activities”, what should I add in the flowchart?

No worries
So for this one
Kindly elaborate a bit more on this pls

Cheers @MubieSam_Lin

@Palaniyappan
If condition: item.Subject.Contains(“newFormSubmission”) got a match, Then how can I retrieve the content of the email which contains a form submission with 5 items, (read into dataTable?) to be used for “type into” activities. (read from dataTable to type into some fields on a website)

BTW, when run “get IMAP mail message”, got an error “Invalid credentials (Failure)”, but I’m sure the password is correct. (should I used the quote"" for Logon email and password?)

***just got a warning email from google, said they had blocked the request from a non google application, what should I do with this?
Thanks

1 Like

Seems there is no way to retrieve part of the content of the email, only Save Mail Message to a specified folder. Need to find the alternative in other way…
Thanks anyway… @Palaniyappan

1 Like

For the error “Invalid credentials (Failure)”, it’s my bad, I should have read this first…
Enabling Gmail for UiPath Email Activities

1 Like

@MubieSam_Lin - Google blocks connections from “Untrusted Applications”. You could try going into security for the gmail account and turning that off, but, I have not been able to connect from UIPath even when doing this - they are more strongly enforcing this security.

EDIT: NM I see that have the per application password - I had forgotten about that.

1 Like

yes, application password is the solution.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.