Creating custom email templates with mailgun integration

I have mailgun working with my parse-server app deployed on heroku. The default email verification messages that get sent to users look pretty basic.

When someone creates a new account, they receive something like this:

Hello,

Please verify your email address [email protected] for MyAwesomeApp

Verify by clicking this link:
https://myapp.herokuapp.com/parse/apps/ABCDE/verify_email?token=ZZZZZ&username=john

This works fine but I want to make it look more professional and branded. I tried some solutions I found online but they did not work for me.

What is the correct approach to customize these email templates? Also, can I set up different templates for multiple languages depending on user preferences?

mailgun’s template editor is super user-friendly! i created my HTML templates directly in the dashboard, using handlebars vars for dynamic content like verif links. then, just tweak the email adapter in parse’s config to use these instead of basic text emails. looks way better than the old-style ones!

I transitioned from Parse Server’s default email system to Mailgun templates around six months ago, and it significantly improved my email formatting. I implemented custom cloud functions to handle user registration and password resets, allowing me to use Mailgun’s templates with dynamic content. For multi-language support, I store user language preferences at registration and send the appropriate Mailgun template based on this. The verification tokens remain functional, as this only alters the email presentation, not the underlying verification process. Lastly, ensure that your email domain is verified in Mailgun, as I encountered issues with custom emails being flagged as spam.

Had this exact problem building my app last year. The default templates are pretty bland for anything serious. I ended up using Mailgun’s template API instead of trying to hack Parse Server’s built-in ones. Create your HTML templates in Mailgun’s dashboard first, then point Parse Server to them by setting emailVerifySubject and appName in your config. You’ll also need to override the verificationEmailBody option. The tricky bit is keeping your verification links working after you customize everything. For multiple languages, I detect the user’s locale when they register and save it to their user object. Then I use that to pick which template variant to send. Takes some extra backend work but it’s totally doable. Just test the hell out of it since email verification is make-or-break for user onboarding.