Welcome to the community
As per error looks like the license is expired or outlook has been upgraded
If upgraded then try to get latest version of mail packages…if outlook is expired or programmatic access is revoked then make changes accordingly
Cheers