Mailgun integration in Ghost 4

I am self-hosting Ghost, and just installed 4.0.0 using the Ubuntu instructions. In general, it worked flawlessly. However since I cannot turn off the membership feature now, I am trying to hook up Mailgun using the bulk email API (not SMTP). I have another site using Mailgun, so am pretty familiar with it, but when I try and enter the sandbox account and API key into the settings of Ghost, I get the following error in the log when an email goes out:

NAME: EmailError
MESSAGE: Failed to send email. Reason: Greeting never received.

level: normal

“Please see Configuration - Adapt your publication to suit your needs for instructions on configuring email.”
EmailError: Failed to send email. Reason: Greeting never received.
at EmailError.GhostError (/var/www/ghost/versions/4.0.0/node_modules/@tryghost/errors/lib/errors.js:10:26)
at new EmailError (/var/www/ghost/versions/4.0.0/node_modules/@tryghost/errors/lib/errors.js:34:20)
at createMailError (/var/www/ghost/versions/4.0.0/core/server/services/mail/GhostMailer.js:52:12)
at EventEmitter. (/var/www/ghost/versions/4.0.0/core/server/services/mail/GhostMailer.js:119:28)
at Object.onceWrapper (events.js:422:26)
at EventEmitter.emit (events.js:315:20)
at EventEmitter.emit (domain.js:467:12)
at DirectMailer. (/var/www/ghost/versions/4.0.0/node_modules/directmail/lib/mailer.js:185:42)
at SMTPClient. (/var/www/ghost/versions/4.0.0/node_modules/directmail/lib/mailer.js:277:9)
at Object.onceWrapper (events.js:422:26)
at SMTPClient.emit (events.js:315:20)
at SMTPClient.EventEmitter.emit (domain.js:467:12)
at SMTPClient. (/var/www/ghost/versions/4.0.0/node_modules/simplesmtp/lib/client.js:293:18)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)

In my configuration JSON is the default config that got written out during install, so my mail transport is “Direct”, with no other properties. Am I missing something? How do I turn on “bulk email”?

Thanks in advance.

Minor edits to original post to indicate that I am trying to do bulk email, not SMTP.

So, here is the fix. You need to set up the Mailgun SMTP first. Period. SMTP and bulk email are apparently both being used, so things like registration go through SMTP and posts use bulk.

Once I set up SMTP to my Mailgun domain (in the config json), I could subscribe. And once I had that, plus my bulk sending credentials set up in the admin UI, I have emails flowing correctly.

For the Ghost folks, this is terribly counter-intuitive and needs a bit more clarity in documentation. Also, why would one email config be in JSON while another is via the admin interface?