Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: apiKey value must be defined! #100

Closed
WillSquire opened this issue Nov 16, 2020 · 11 comments
Closed

Error: apiKey value must be defined! #100

WillSquire opened this issue Nov 16, 2020 · 11 comments
Assignees
Labels

Comments

@WillSquire
Copy link

This isn't working at all for me. When apiKey is set it still throws Error: apiKey value must be defined! from the mailgun-js dependency.

MailGunTransport({
  auth: {
    apiKey: configService.emailApiKey, // tried hard coding this, the value is definitely set
    domain: configService.emailDomain,
  },
  host: 'api.eu.mailgun.net',
}),

Versions:
"nodemailer": "^6.4.16",
"nodemailer-mailgun-transport": "^2.0.1",

@orliesaurus
Copy link
Owner

looks like you have a spelling error on the key name. Compare to this:

  auth: {
    api_key: 'key-1234123412341234',
    domain: 'one of your domain names listed at your https://mailgun.com/app/domains'
  },
  host: 'api.eu.mailgun.net'
}

@orliesaurus
Copy link
Owner

@WillSquire can you let me know?

@zgid123
Copy link
Contributor

zgid123 commented Nov 25, 2020

@WillSquire if you use with typescript, ignore the apiKey right now. Because my PR is merged but still not released yet

@WillSquire
Copy link
Author

Apologies for not getting back. It is indeed the Typescript definition

@zgid123
Copy link
Contributor

zgid123 commented Nov 25, 2020

yup, I created that option after this PR #98 was merged, but the @types already released but the version of this package did not

@orliesaurus
Copy link
Owner

yup, I created that option after this PR #98 was merged, but the @types already released but the version of this package did not

Did I forget to npm publish your version?

@zgid123
Copy link
Contributor

zgid123 commented Nov 26, 2020

Yes. I just reinstalled this package again and no new version. Checked the code in node_modules, the code does not contain my change

@orliesaurus
Copy link
Owner

Yes. I just reinstalled this package again and no new version. Checked the code in node_modules, the code does not contain my change

Alright gonna fix it today! Thank you for reminding me I must ve forgotten woops!

@orliesaurus
Copy link
Owner

abrakadabra - pushed! Thanks @zgid123

@zgid123
Copy link
Contributor

zgid123 commented Nov 27, 2020

thank you, just tested and it worked with apiKey

@orliesaurus
Copy link
Owner

Perfect closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants