recently i encountered a problem with reading SMTP mail and download attachments. Background: we are not using outlook so any outlook activities cannot be used.
As you can see from the following screen shots. This is a message that i got forwarded from our external supplier. However, when i try to read the “sender”, “main body” and try to download the attachments from it, UiPath returns errors
Sender → object reference not set to an instance of an object
Main body → empty
Attachments → no attachments found
And when i try to forward the email using send SMTP message. Only a part of the email will be forwarded. However, if i try it manual, the whole message with the attachments are forwarded correctly.
I’m wondering whether anyone has come across the same problem and can help me out. thanks a lot!
check whether its geting mail with attachment or not
use a writeline activity and mention like this inside the for each loop activity #Mail.Attachments.Any.ToString#
If its true then its wrking fine