Tons of mail windows opened because of no preferred outgoing server

I don’t use mail normally. So today when I open my app, this caught me by surpriseenter image description here

I selected one of the server and then close the mail window, but there are just so many to go through.

My questions:

1) The email are seemingly created based on some of my calendar events. Why they tried to send me emails?

2) How can I efficiently close all these windows in one go, instead of making a selection of outgoing server than close a mail window?

I have tried to quit the mail app from its context menu of the Dock, but it just forces one of the mail window to the foreground.