How to use other key combination to replace ⌘W? [duplicate]

You can add a Key Command to any app [or all apps] from
System Prefs > Keyboard > Shortcuts > App Shortcuts
I don't have Airmail, but using Safari as an example

enter image description here

Hit the + button, select which app, type the menu name & your chosen key combo
For an app you don't want the original key combo to work for, replace it with something difficult to hit, or something you would never use, like
Cmd ⌘ / Opt ⌥ / Ctrl ⌃ / Shift ⇧ / F15 etc

Alternatively, if you want to replace Quit with Close Window, you add Cmd ⌘ Q to Close Window instead, [so long as that command appears in the menu somewhere] which will automatically remove Cmd ⌘ Q from the Quit item

enter image description here