问题
It would be awesome if I could just send emails via mailjet from the frontend without the need of a backend.
The only implementations on their page are for backend systems. But shouldn`t it in theory be possible to use mailjet without a backend? Sending emails through mailjet should be nothing more than just some post request, don't they? If so, why is there no JS implementation?
回答1:
Disclaimer: Mailjet's employee here.
As long as you don't expose your credentials to the public, you can call the Mailjet's APIs using HTTP. The tool's choice is up to you: cURL, Postman or Paw, one of our language wrappers, or directly any HTTP call such as XMLHttpRequest for your JavaScript front-end.
You will find many examples in our documentation.
To learn more about credentials security, I advise you this nice W3C webappsec credential management ebook.
hAPI coding!
回答2:
You can but where do you plan to keep your public and private key?
来源:https://stackoverflow.com/questions/41785727/send-emails-via-mailjet-without-backend