Specific format required for from email address

AI-generated summary

Nikola_Mitrovic is experiencing issues with Discourse’s email sending due to their SMTP provider requiring the “from” address to be in Mailbox format (Name <example@domain.com>). They have tried setting the DISCOURSE_NOTIFICATION_EMAIL environment variable in the app.yml file, but it still fails with a “SMTP From address may not be blank: nil” error. pfaffman suggests that a different SMTP provider may be needed or a plugin could potentially override the SMTP settings in Discourse, but notes that it won’t be an easy solution.

My team’s SMTP provider requires the from address to be formatted in Mailbox format (Name <example@domain.com>), otherwise the SMTP server throws the following error when using ./discourse-doctor to test email sending:
554 error: from_field_is_not_present
I have already confirmed that the login credentials are valid and the connection SMTP server is established correctly.

I have tried to set DISCOURSE_NOTIFICATION_EMAIL in the app.yml file like this

The final environment variable after the container is rebuilt looks like this:

DISCOURSE_NOTIFICATION_EMAIL="Hiveologie <happenings@hello.hiveologie.com>"

After running the ./discourse-doctor email test again it parses the from email address as missing, and fails with the following message

Sending to `nikola@hiveologie.com`. . .
Sending mail failed.
SMTP From address may not be blank: nil

Is the current version of Discourse able to parse this email format when sending notifications or am I missing something when it comes to setting the environment variable in app.yml file, like escaping the space character properly or getting the single and double quotes in a specific order?

Then you’ll need a different SMTP provider or to figure out how to override the SMTP stuff in Discourse. I suppose a plugin can do it, but it’s not going to be easy.