Setting up email newsletters with your own email server

Hi,

I don’t need to set up MailGun as I have my own email server that is well configured.
I saw the great feature that was finally added in beta.

Instead of using a proprietary service such as Mailgun, can we use our own email server for the new email newsletters feature?

1 Like

I setup my own Emailserver and it works :wink:

Ok I will try today later on. Thanks

Edit the produktive Json file at the rootfolder and add these

"mail": {
"from": "noreply@ domain.tld",
"transport": "SMTP",
"options": {
  "service": "mail",
  "host": "my.domain.tld",
  "port": 465,
  "secureConnection": true,
  "auth": {
    "user": "kontakt@ domain.tld",
    "pass": "yourpassword"
  }
}

},

1 Like

@Happyfeet01 this does not affect newsletters, the config you are showing is only for transactional system emails such as password resets etc.

If you want to send bulk email using Ghost’s built-in functionality then the only option right now is to use Mailgun.

1 Like

Okay good to know

Mailgun is about to become expensive (given their recently announced changes to their pricing). Any good sized newsletter would have 10k+ subs, sending an email once a week takes you definitely out of Mailgun’s new free tier (offering only 650 emails/month). MailGun is ending their free tier March 1st. Does anyone have good alternatives?

Are alternative “bulk” email sender integrations in the works, Ghost team? :slight_smile:

From what I understand mailgun offers 3 months trial for up to 5000 emails, correct?

I thought it was always free with a limit of {n} emails per month.

This will be a problem for me too.

Mailchimp could be a viable alternative

Funnily enough, I’ve just received their email on the new pricing.

It seems they actually offer no free emails any longer (lower tier now called flex). There is no longer a free tier. It is only a pay-as-you-go.

The 5000 emails you refer to happens only during trial (3 months).

So, yes, no more free emails at all with Mailgun.

Mailchimp is … well… sadly (actually), the most expensive option out there.

well, this is REALLY bad.
At least mailchimp has a “free” ridiculous plan :slight_smile:

Oh that’s bad.

No chance to use my own Mailserver?

Configuring the email in the json file, has no effect on the newsletter, but has an effect on the members’ singup and signup email?

This doc should be updated as mailgun is no longer free.

Hey Kevin! I know the tryGhost githubs’ issue tracking state that it is ONLY for bug reports… Are there any way to request or vote for a feature to be implemented? It would be extremely useful to allow people to use custom mail servers to send emails instead of relying on 3rd party provider, who just like in this case have unreliable pricing. (never marry a 3rd party service provider if you can avoid it).

There are a ton of free and easy to use mail servers and it is about as easy setting up as mailgun is.

I have been digging a bit in the source code, and I don’t see why ghost/core/server/services/mail/GhostMailer.js shouldn’t be able to do all the mail sending if configured properly :slight_smile:

1 Like

@Kevin

I have created a new clean installation of Ghost on a public VPS.
I associated the Stripe keys.

The email arrives correctly on all addresses.

But it seems that the configuration in the config file does not overwrite anything.

In the “form address” field of the Members tab, I entered: noreply
In the settings of Mailgun I have not entered anything.

The config file is set up like this:

  "mail": {
    "from": "'SECOND-DOMAIN.it' noreply@SECOND-DOMAIN.it",
    "transport": "SMTP",
    "options": {
      "host": "smtps.aruba.it",
      "port": 465,
      "secureConnection": true,
      "auth": {
        "user": "noreply@SECOND-DOMAIN.it",
        "pass": "password"
      }
    }
  },

The noreply email account really exists, it is an active account.

When I register as a normal or paid user I receive the email from noreply@FIRST-DOMAIN.it.
So the from address field wins over the one in the config.

I restarted Ghost. I also stopped Ghost completely and then started.

It works for you without mailgun?

I’m shocked and upset to find our about this Mailgun limitation! :frowning:

Is there a timeline to when more flexibility will be available?

1 Like

I give in to the limitation of Mailgun. Any idea how to fix the below:

I tried modifying nginx a bit but nothing seemed to work and I don’t want to mess anything up.


Yet again, @vikaspotluri123 to the rescue! :slight_smile:
Hopefully, this helps someone one day. The issue was that ghost/config had my domain without the www. Everything is working flawlessly now!

Is there still no plan to lift the restriction to a proprietary service?

Ghost newsletter functionality depends on Mailgun. This will not change for the forseeable future. It has nothing to do with restrictions. You cannot just send bulk email newsletters with SMTP. That is not how email newsletters work.