Can not delete messages in SPAM folder

Every time I try to delete the contents of the SPAM folder I get the following message:

3,961 messages could not be moved to the mailbox “Get America’s #1 Rated Gutter Guard”

I have tried selecting them all and hitting delete and selecting them all and dragging to Trash.

Apple Mail version 12.4
SpamSieve 2.9.36

It sounds like your Apple Mail database is damaged and needs to be rebuilt.