MAIL_URL is set locally, but is undefined in deploy to Galaxy RESOLVED

Hi everybody, I haven’t been able to resolve this issue after trying every tweak I can think of. I’m getting this error whenever I send an email on the Galaxy deployed version of my app:

Error: Email protocol in $MAIL_URL (undefined) must be ‘smtp’ or ‘smtps’

The local version of my app sends it just fine. This is how I’ve set my environment variables:

  "": {
    "env": {
      "MONGO_URL": "mongodb://",
      "MAIL_URL": "smtp://"

This is the script I have to deploy in package.json:

"staging": " meteor deploy --settings settings-staging.json",

Any help would be greatly appreciated!!

Resolved. I had to manually set process.env.MAIL_URL on the server startup. Though from the docs it seemed like it would set automatically, it didn’t.