Error getting emails' attachments from office365

I want to get emails’ attachments drom Office 365, but doent go to the second loop (it seems that there are not attachments, but that is not true). Any idea?

   authO365 = (str(usermail),str(passmail))
   i = Inbox(authO365,getNow=False)
   i.setFilter("IsRead eq false")
   for email in i.messages:
           subject = email.getSubject()
           body = email.getBody()
           mailsender = email.getSenderEmail()
           for attachment in atta:    #this loop
               report_name = date_time + '_' + attachment.FileName

               attachment.SaveASFile(my_path + '/' + report_name)
                print('Attachment saved: ' + report_name)

What’s this line printing?

This prints “[]”, I am really lost right now.

I faced this problem a year ago and can help you. All you need to do is to reset all the settings and clear cache. Don’t forget to do an Office 365 backup with the help of as a necessary precaution. It helped me, and I haven’t faced this problem ever since. Feel free to dm me.

1 Like

I also faced the same problem with my office 365 I did not find the solution for the issue. I try to installed microsoft office 365 download from the official site and log in to the admin portal but it did not help me. if anyone know about this help me.

1 Like

Thanks for this! I’ve been looking for a solution for years now