Clicking on links in Apple Mail (http or https, doesn't matter), opens a new iTerm 2 terminal session instead of my default browser. I can't figure it out.
Weirdly, iTerm.app shows up as a potential email handler under Mail.app > Preferences > General > Default email reader. It wasn't selected (Mail.app was), but I tried selecting something else (Microsoft Outlook.app, in my case), as per this question, just in case some setting there had been messed up (obviously this should be irrelevant to the problem at hand but you never know how things are cross-linked under the hood). Interestingly, that setting would not stick: upon quitting and re-opening Mail.app, Mail.app would again be selected as the default email reader. But none of that changed the behavior. It's very confusing, but I'm wondering if I've just reached the end of the useful lifetime of Apple Mail under OS X 10.11.6 (yes, yes, I know, way out of date - I haven't updated because of compatibility concerns with software I need to use to do my job.. but maybe I will bite the bullet soon). Mail.app version is 9.3 (3124).
Update: So, looking at my default browser under Apple > System Preferences > General > Default web browser shows nothing selected, and when I click on the dropdown menu, there are no items available to select, which of course is ridiculous, as I'm software developer and have four browsers installed (Opera, Safari, Chrome and Firefox). So I'm guessing some .plist that contains the default web browser has become corrupted.