-
Notifications
You must be signed in to change notification settings - Fork 109
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
Correct mailgun JS library? #345
Comments
Nope, it seems that lib is abandoned. |
Thanks, I was already started down that road. It seems like the path of least resistance. It would be nice if Mailgun released a real data API rather than a form post. |
Hello @pelicanenglw @nosovk |
Actually I don't see place where nestjs mentioned. Issues mentioned in chat are regarding running in Cloudflare workers, and regarding node18 native formdata (more issues in GitHub). |
Found issue with NestJS, it's related to typescript import, not to NestJS |
Okay let's go one by one:
It may be related to typescript import but it is more likely something wrong with the way of importing the
|
just for information - according to #341 (comment) this lib could work without FormData at all. The same story with axios - it's not necessary to use it when we have undici, it's seems that accepting fetch instead of FormData could be good idea. Unfortunately weekly downloading number not a sign of quality or support. It means that library used as a backbone in some popular dependencies, nothing more. Regarding pulls - if they are irrelevant and should be closed - then why they exist? Isn't it a sign of not well maintained library? In common I was able to fix my issue without lib (see comment attached) and now for me issue is not relevant. Thanks for willing to support OSS, Mailgun is good product and I hope they will support maintaining good nodejs wrapper for their library. |
The old library mailgun-js works fine, other than the security issues. The new one mailgun.js, certainly does not work in my testing (vanilla JS not TS). Using the form post api works correctly and this is what I ended up implementing. In general people are still being directed to -js both in docs and in forum posts. So this leads to a lot of confusion. The new library not working for some just adds to it. In my case the objects were correctly serialized by the form-data library but I did not spend more time on why it was generating the error in mailgun.js. The quicker path was talking directly to the mailgun API. |
@pelicanenglw Happy to hear that you've resolved the issue. |
@olexandr-mazepa we were using mailgun.js on the backend - Node v14.21.1. I only tested in my local environment (MacOS 12.5.1). The previous mailgun-js worked without issue. |
@pelicanenglw This is the code example I used:
Are you see a difference from your code that you think may cost the issue? |
The v8.0.6 gives me a "Module Not Found Error" because i'am importing it with require. Whilst this error when i hover on the require id, it displays the correct path dir to "/node_modules/mailgun.js/index.ts". I'am using Node v16.9.0. |
I’m really confused…. The mailgun API docs were updated yesterday - Jan 30, 2023 and it still lists mailgun-js as the formally supported library. On the plus side it works but there are security issues with old dependencies.
This library does not appear to work. (See form-data issue #339 form-data error)
Does anyone have a working node example using this library?
The text was updated successfully, but these errors were encountered: