メールサービスを変更したところ、フォーラムがIPアドレスでもURLでも解決しなくなりました

Im not sure, but i think you can change SMTP details in app.yml then rebuild?

And as you have done it by discourse setup, maybe you should grey out the “a” record and re-try it in 5 minutes, to install it in the correct ip adress.

Hope its helps