Troubleshooting Email Config Mailjet

AI-generated summary

In a discussion titled ‘Troubleshooting Email Config Mailjet’ under the Self-hosting support category, CorruptBlu reported issues sending registration emails via Mailjet, despite following guidance to properly format the containers/app.yml file — specifically, adding single quotes around the DISCOURSE_DEVELOPER_EMAILS field, which triggered a YAML syntax error: ‘did not find expected key while parsing a block mapping’. neounix suggested validating the YAML syntax using an online tool like http://www.yamllint.com/, noting that YAML files can be finicky. Ultimately, CorruptBlu resolved the issue not through YAML fixes, but by realizing their domain had not been properly connected to Mailjet — once connected, email delivery worked as expected. The thread highlights the importance of validating YAML syntax and ensuring third-party service integrations (like Mailjet) are fully configured before troubleshooting code or config files.

I am using Mailjet, and it wasn’t sending the email for registering the admin account, so I tried the fix above, but whenever I add the single quotes around the email I get an error as shown below:

(<unknown>): did not find expected key while parsing a block mapping at line 40 column 3 -e LANG=en_US.UTF-8
YAML syntax error. Please check your containers/*.yml config files.

Anyone know how I can fix this?

Hi @CorruptBlu

yml files can be a bit trick at times.

You might consider running your container yml file though a yml syntax checker.

I use this one, from time to time:

Here is an example, where we copy-and-paste an entire yml file and test it (showing some “env vars of interest” in the screen shot):

It actually turned out that I hadn’t connected my domain to Mailjet. It’s fixed now.