1

I am looking for a good guide (or tutorial) on setting up mailgun to work on parse-server hosted on heroku.

Having trouble with some iOS app of mine not working.

I would like to review the process of setting up mailgun, following best practices and up to date documentations.

Community
  • 1
  • 1
Michel
  • 10,303
  • 17
  • 82
  • 179

1 Answers1

1

I found it to be fairly straightforward with plenty of resources available by googling parse-server and mailgun. If you don't need templatized emails then you can just add mailgun to your package.json and configure your mailgun adaptor in your index.js file like this:

new ParseServer({
  databaseURI: xxx,
  appId: xxx,
  ...
  emailAdapter: {
    module: 'parse-server-simple-mailgun-adapter',
    options: {
      fromAddress: 'donotreply@yourdomain.com',
      domain: process.env.MAILGUN_DOMAIN,
      apiKey: process.env.MAILGUN_API_KEY,
    }
}

see also: https://stackoverflow.com/a/37757222/4228969

Community
  • 1
  • 1
toddg
  • 2,863
  • 2
  • 18
  • 33
  • Well "straightforward" is what I would think if I had all my apps working. And yes "googling parse-server and mailgun" brings some information. The problem is that it is not always clear. Precisely I have one of my app working with no trace of mailgun in the package.json and still sending a verification mail when a user creates an account. My issue is that I set up mailgun and parse-server already a few months ago and I do not remember all the details, making it difficult to see why it does not work in some cases. – Michel Apr 12 '17 at 02:43
  • I finally solved the problem. Thanks. See http://stackoverflow.com/questions/43336641/mailgun-parse-serverheroku-not-working – Michel Apr 18 '17 at 15:07