Email Setup with Heroku

The Issue

Setting up SMTP for Heroku apps is not working with SendGrid, Mailgun, or Gmail SMTP.

I have used the one-button install for Metabase on Heroku and configured a few dashboards. I then wanted to invite people and setup subscriptions so I looked into adding Sendgrid, Mailgun, and Gmail SMTP servers. None of these solutions are working to send an email. The UI says an email was sent. I can see the link in the Heroku logs with no errors but nothing sends with any of them.

From what I can tell Mailgun might be the best option as the Sendgrid Basic Auth send is no longer a great way and Metabase needs to update that integration according to (SendGrid)[] and the (Setup script)[].

Please advise.


  "browser-info": {
    "language": "en-US",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36",
    "vendor": "Google Inc."
  "system-info": {
    "file.encoding": "UTF-8",
    "": "OpenJDK Runtime Environment",
    "java.runtime.version": "1.8.0_322-heroku-b06",
    "java.vendor": "Oracle Corporation",
    "java.vendor.url": "",
    "java.version": "1.8.0_322-heroku",
    "": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "25.322-b06",
    "": "Linux",
    "os.version": "4.4.0-1097-aws",
    "user.language": "en",
    "user.timezone": "Etc/UTC"
  "metabase-info": {
    "databases": [
    "hosting-env": "heroku",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "13.5 (Ubuntu 13.5-2.pgdg20.04+1)"
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.2.23"
    "run-mode": "prod",
    "version": {
      "tag": "v0.41.6",
      "date": "2022-01-10",
      "branch": "release-x.41.x",
      "hash": "296635f"
    "settings": {
      "report-timezone": null

Hi @corbanb
The Heroku script lives elsewhere and there's a PR open about removing it:

Thanks, @flamber for the response.

I moved away from the Heroku config and am now using the SMTP variables in the UI. But no luck. Is there something I am missing? What services does Metabase recommend using there?

Gmail gives Username and Password not accepted for me. Is there a service you all prefer here especially when using Heroku.


I don't understand what you mean by "moved away" - Heroku requires a deploy config.
Generally, I cannot recommend Heroku because of some of the limitations, which doesn't work well with Metabase.
Gmail requires App Password as far as I know. It doesn't support the old style anymore.

@flamber I'll check out the Gmail app password.

When you say limitations with Heroku what do you mean here? Seems very straightforward.

Is there a recommended way metabase prefers?

@corbanb Have a look at these issues:
I would recommend any hosting, where you run either JAR or Docker.