phpmailer_init ignored on REST calls

I found the “issue”.

I had another mailing provider (Postmark) installed as a plugin, which I brought in my local site by mistake. That prevailed over any other mailing configuration.

I deactivated the plugin and now my hook works fine.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)