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 surprise

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.
Trying to send you emails because, email is one of the options for Reminders in Calendar. 


To get rid of this for existing events, simplest is just to manually one-by-one change the reminder setting. Alternative would be (1) export the calendar to a file, (2) Make a backup copy for when you mess up step 3 and regret it bitterly at step 4, (3) edit the file to search and replace reminders (4) delete your calendar (5) import the edited events.
To get rid of this for future events, I think you just have to change the reminder setting once; on your one next new event. Then it will remember.

Force-quit with  ⌥⌘esc. If that really really doesn't work, logout.
Worst case, avoid the future annoyance either by telling the Mail app your email details; or open Mail app -> Preferences to tell it what program you actually do use for email.