orliesaurus / nodemailer-mailgun-transport

nodemailer is an amazing node module to send emails within any of your nodejs apps. This is the transport plugin that goes with nodemailer to send email using Mailgun 🔫
MIT License
880 stars 97 forks source link

Broken on Node 18 #121

Closed kerberjg closed 1 year ago

kerberjg commented 1 year ago

Whenever I try to send emails via this module from my application on Node >= 18, I get the following error:

(node:23783) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

[Error: Bad Request] {
  status: 400,
  details: { message: 'from parameter is missing' }
}

Simply changing the Node version to 12 or 14 mitigates this, but it's not something we can use in production as we need the features of Node 18 for our project.

This is not a duplicate of #116, as in this case the email does not send at all, however the fix for both issues would be to simply upgrade the mailgun.js dependency. This module is currently depending on v3.3.0, while v8 is available.

orliesaurus commented 1 year ago

@kerberjg - with the latest updates merged in and thank you sam-lord this should be fixed!

kerberjg commented 1 year ago

Neat! Thanks a lot 😄✨