Localise system emails on the fly or programatically control them from cloud code

I am using parse-server-api-mail-adapter for mailgun emails (one of the mailgun ones are using an outdated lib now and dont work and the other one im not sure why it doesnt work).

I allow users to change language on the fly during registration and pre-login - is there any way to localise these emails from a parameter provided an the UI level or maybe some way to programatically send a specific template via cloud code with the required system information like reset link etc ?

  • To set the language of the email template you could use the mail adapter’s localeCallback.
  • To set the language of the pages of any HTML form (password reset, etc.) you could use pages.

Perfect, I wasnt sure if localeCallback was only for custom emails, so it also controls the parse system emails ?

Yes it should. The template definition is the same, regardless of whether it’s built-in or custom.

1 Like