python保存邮件附件时报错:AttributeError: 'function' object has no attribute 'Attachments'

    for mail in a:
        if (('招行,工行到款,请认款,另附KAB格式,以便查询' in mail.Subject)):
            print('接收时间:{}'.format(str(mail.ReceivedTime)[0:10]))
            Highrisk_BP.loc[i, '邮件时间'] = str(mail.ReceivedTime)[0:10]
            print(type(mail.ReceivedTime))
            print('主题:{}'.format(mail.Subject))
            Highrisk_BP.loc[i, '邮件主题'] = mail.Subject
            print('邮件附件数量:{}'.format(mail.Attachments.Count))
            i += 1
    Highrisk_BP.to_excel('D:\\email\\Highrisk_BP2020.xlsx')
            # 保存邮件中的附件,如果没有附件不会执行也不会产生异常
    attachment = mail.Attachments
    for each in attachment:
                   save_attachment_path = 'D:\\email\\attachment'  # 保存附件到当前路径
                   each.SaveAsFile(r'{}\{}'.format(save_attachment_path, each.FileName))
                   print('附件({})保存完毕'.format(each.FileName))


read_outlook_mailbox()

https://www.cnblogs.com/balllyh/p/10401556.html
参考下这个。