Error Message: An invalid character was found in the mail header: '.'

I am getting error while reading the Subject of the mail as Source: Get IBM Notes Mail Messages Message: An invalid character was found in the mail header: ‘.’. Please help, does underscore in not supported?

Hi
Welcome to uipath community
Kindly share us a screenshot of what you have mentioned along the activity
Cheers @Garima_Jain

image

I am using “Get IBM Notes Mail Message”. I tried to fetch the subject of mail with “New Joinee” with mail.subject.contains(“New Joinee”).
I also figured out that this message is coming If I read mail beyond 7 mails.

hi @Garima_Jain

please share a screenshot…

I hope that for at last is the reason
Is it mention the same in the condition or you have mentioned with a full stop (.) here along the sentence in comments
You are right
mail.subject.contains(“New Joinee”)

Cheers @Garima_Jain

I have not mentioned full stop(.) .
Also, even if I am just displaying subject of each mail using for-each loop and mail.Subject is used, it throws same error, if I mention Top value more than 7 in properties.

1 Like

hi @Garima_Jain

Please check once this link

Regards,
Srikanth

Yes checked , so need to report to Tech support team?

1 Like

fine can i have a view on that condition mentioned in the workflow a screenshot if possible
Cheers @Garima_Jain

1 Like

I dont find any such condition like
mail.subject.contains(“New Joinee”)

Is this what been used buddy
Cheers @Garima_Jain

mail.Subject.Contains(“New Joinee”) is just an example, i am getting error reading any mail if count reahced beyond 7.

@Garima_Jain
You are using a foreach loop and then inside that trying to access the properties of the mail. Can you please check the target property of the foreach loop. This property has to be set to mailmessages.

Also can you specify the exact subject from email.

Sorry i got confused what the error you were getting
because i dont find any thing wrong here inthe workflow may be the type argument of the for each loop might be missing and it should be system.net.mail.mailmessages
or else everything looks good actually

And its not because of the TOP property been mentioned with 7 and it means it will give us first 7 mails as output

So what is the actually error we are getting and in which activity we are getting that error
kindly run once in debug mode by pressing F7 and enable highlight element option in the EXECUTE tab in studio so that we could be able to see at which activity its getting failed

Kindly try this and let us know pls
Cheers @Garima_Jain

Already set system.net.mail.mailmessages

image

I tried many times, when I mention TOP count more than 7, it start throw error message mentioned in subject of this thread.Till count 7, it properly reads and display message.

1 Like

Ran in F7 mode


What happens if you dont specify any number in Top property(as its non mandatory)?

for each not started

That means there are no emails retrieved. Can you confirm this by looking for the email count retrieved?