Error: apiKey value must be defined!
Closed this issue ยท 12 comments
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",
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'
}
@WillSquire can you let me know?
@WillSquire if you use with typescript, ignore the apiKey
right now. Because my PR is merged but still not released yet
Apologies for not getting back. It is indeed the Typescript definition
Yes. I just reinstalled this package again and no new version. Checked the code in node_modules, the code does not contain my change
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!
abrakadabra - pushed! Thanks @zgid123
thank you, just tested and it worked with apiKey
Perfect closing
I think maybe the documentation for this says the api key should be in the key "key"