I'm working with JS and I have the following code:
var XHRResponse = XHR.send("POST", ".mailgun/messages",{
"parameters": {
"from": "Mailgun Sandbox <[email protected]>",
"to": "Jordi <[email protected]>",
"subject": "Hello Jordi",
"text": "Congratulations Jordi, you just sent an email with Mailgun! You are truly awesome! You can see a record of this email in your logs: . You can send up to 300 emails/day from this sandbox server. Next, you should add your domain so you can send 10,000 emails/month for free."
}
});
I need to authenticate with the API key but I don't know where and how.
I'm working with JS and I have the following code:
var XHRResponse = XHR.send("POST", "https://api.mailgun/v2/sandbox224f28ae45a8499d84184fd4c48e62ee.mailgun/messages",{
"parameters": {
"from": "Mailgun Sandbox <[email protected]>",
"to": "Jordi <[email protected]>",
"subject": "Hello Jordi",
"text": "Congratulations Jordi, you just sent an email with Mailgun! You are truly awesome! You can see a record of this email in your logs: https://mailgun./cp/log. You can send up to 300 emails/day from this sandbox server. Next, you should add your domain so you can send 10,000 emails/month for free."
}
});
I need to authenticate with the API key but I don't know where and how.
Share Improve this question edited Jul 26, 2024 at 22:51 LW001 2,9337 gold badges32 silver badges42 bronze badges asked Jun 11, 2014 at 10:02 user3729460user3729460 591 silver badge2 bronze badges 2- 1 See this for authentication: stackoverflow./questions/5507234/… – xyres Commented Oct 16, 2016 at 16:52
- You can't send email from the browser. If you do this, people will steal your API key and use it to send huge volumes of spam (or worse) on your behalf. – user229044 ♦ Commented Jul 26, 2024 at 23:20
1 Answer
Reset to default 10Mailgun API documentation has the entirety of this information. Look at the Authentication section specifically, https://documentation.mailgun./docs/mailgun/api-reference/authentication/. However with that being said, I wouldn't run this in the client if they, and if I understood correctly, require the key to be written in plain text.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743735931a4498259.html
评论列表(0条)