fakruzaruret as indicated by the error message, Composer is out of memory. Try increasing the memory available for PHP CLI or maybe you'll need to add SWAP to the server. It's not related to this extension.
It's odd that composer require kilowhat/flarum-ext-mailing
doesn't pick up 0.2.2
. It says version ^0.2.1
which should pick up 0.2.2
. Maybe an old version of Packagist cache was used. The fact fof/terms is also in there suggests the cache was outdated as well.
There are some commands I can never remember to clear the cache. But apparently you've got more problems if the memory is insufficient. Clearing the cache won't solve the memory issues.