davellanedam / node-express-mongodb-jwt-rest-api-skeleton

This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp
MIT License
904 stars 286 forks source link

Mailgun fails for hosting in EU regions #222

Closed dwf981 closed 3 years ago

dwf981 commented 3 years ago

Mailgun will fail when the app is hosted on a european server (no explicit error) due to Mailgun configuration.

To reproduce:

PS: my solution for hosting the app in the EU region: Edit sendEmail.js like this:

  const auth = {
    auth: {
      // eslint-disable-next-line camelcase
      api_key: process.env.EMAIL_SMTP_API_MAILGUN,
      domain: process.env.EMAIL_SMTP_DOMAIN_MAILGUN
    },
    host: 'api.eu.mailgun.net'
  }

Related issue: https://github.com/mailgun/mailgun-php/issues/471

davellanedam commented 3 years ago

Thanks! Fixed in v 9.0.3