Sending mail with Mailgun

Hi,
I don’t quite understand how to implement mailgun in my Wix website despite going through the tutorial that exlains how to do so with sendGrid.
If anyone have had any experience with mailgun on his Wix website I’d love to get some help :slight_smile:

Hey,
Do they have a REST API? Basically, I think that it should be a similar code but instead of using the sendGrid API, you should add their API address.

Best,
Tal.

Hey,

I’m having a similar issue. I think my problem is related to authorization. I think gunmail uses basic auth so the pattern should be:

“Authorization” : "<> <>,

Needless to say that doesn’t work. It gives me unauthorized response. I tried the same thing with postman and it works. I’m pretty sure it’s a simple thing but I can’t quite figure it out.

Link to mailgun doc → How to start sending email — Mailgun API documentation

Hey,

So this is by no means a fix but I just copied the header output from Postman and it worked. This header was generated at the Authorization tab, after I selected Basic Auth, added “api” as user and my key as pass. This added a header in the header tab and I just copied the value.


This added a header in the header tab and I just copied the value.


I’ll keep looking for a better fix. Maybe you guys have more luck.

Cheers!

issues with mailgun (other email services may be similar):

  1. no atob, so cannot do the base64 encoding of api:api_key for authentication
  2. no tsscmp package available which is required for mailgun-js to work. Weirdly mailgun-js is available for npm install and installs successfully despite tsscmp being missing.

The only way around this right now is to install an encription package like crypto-js (which is also available).