Airmail: Use name of sender

There is a thread here about an AppleScript to get the name of the sender of an e-mail in Airmail. But I didn't get it to work with Airmail version 5.8.14 (macOS 15.2 (24C101), iMac Intel).

So I used UI scripting to create a macro. If the sender defined his name (FirstName Space LastName), the first name will be used in the salutation. If not (john@doe.co.uk), the first word will be used (with first letter uppercase).

If the e-mail address starts with "info", a generic salutation will be used (Dear Sir or Madam/Liebe Kolleginnen und Kollegen/Geachte mevrouw, meneer; you have to adapt this, depending on your language).

Comments are very welcome.

Reply mail.kmmacros (11.0 KB)

Updated my macro. It tries to determine the sender's country (language) and adapt the generic salutation in case of "info@...".
Reply mail.kmmacros (16.2 KB)