I'm working with JS and I have the follow code:
var XHRResponse = XHR.send("POST", "https://api.mailgun.net/v2/sandbox224f28ae45a8499d84184fd4c48e62ee.mailgun.org/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.com/cp/log . You can send up to 300 emails/day from this sandbox server. Next, you should add your own domain so you can send 10,000 emails/month for free."
}
});
I need to authenticate with the apikey but i don't know where and how.
Thanks
Send via API Run this: curl -s --user 'api:YOUR_API_KEY' \ https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages \ -F from='Excited User <mailgun@YOUR_DOMAIN_NAME>' \ -F to=YOU@YOUR_DOMAIN_NAME \ -F [email protected] \ -F subject='Hello' \ -F text='Testing some Mailgun awesomeness!
Free Email API For Easy Sending. Send, receive, and track emails with Mailgun's free email API.
TextMagic, also a Mailgun customer, allows you to send notifications, alerts, reminders, confirmations and SMS marketing campaign messages to your customers, staff members and suppliers. On average, TextMagic customers are sending over 2.5M text messages around the world each month.
Mailgun API documentation has the entirety of this information. Look at the Authentication section specifically, http://documentation.mailgun.com/api-intro.html#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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With