Question

Loop through Emails ignores emails with no subject

  • 5 March 2022
  • 6 replies
  • 28 views

Hello,

I have noticed that the for each email in mailbox does not seem to see emails where the subject line is left blank. They are left unread by the loop.

I have left the "When Subject Contains (optional)" field empty.

I would expect this to handle empty subject lines as well.

 

I also tried putting a wildcard (*) in the subject line filter. this reads the * as a string and ignores all that do not have an asterisk in the subject. I'm fine with this.

 

Any fixes or workarounds known?

 

 

 


6 replies

Userlevel 3
Badge +7

By using emailSubject dictionary variable you can read the subject from the emails.

 

I assume you want to read the email based on the subject, Is correct?

Please use if condition with email subject, for example,

 

if emailsubject is empty and elseif not equal to empty

Userlevel 3
Badge +7

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-using-email-properties.html/p>

 

Hi Tamil,

In the loop action, I am looping through unread emails but I have tested with all emails. same result.

The loop action is reading the subject and message.

then actions in the loop.

1- save attachments

2 - Rest API call to our CRM to create a note containing the emailSubject and emailMessage.

 

If the subject is not empty, it will read the subject and message and perform actions in the loop on that email.

The email is also changed from unread to read.

 

If the subject is empty, it skips that email. It does not read the subject or message or save attachments

That email stay in unread state.

 

 

Userlevel 3
Badge +7

Hi Chris,

 

Just a random idea, you can change the email status to read and unread after the loop the checking each mail.

 

Check the email-based on your requirements, if matched, please move on next step and change the mail status as well

 

 

 

 

 

 

 

Continued testing has not resolved the issue.

 

I have tried older email and loop packages. same result.

Email with no subject is not acted upon and is left in unread status.

 

I even added a message box in the loop to display the subject of email in the current iteration.

It works on emails with a subject then the bot ends "successfully".

Emails with no subject still unread.

 

Any suggestions would be appreciated.

Hi Tamil,

 

I have manually changed the email to read and then back to unread.

I also added an Change status action in he loop to mark the email as read.

 

Same result, The no subject email is ignored. Still unread.

Reply