Send Email

Prerequisities

To send email you need :

Authorize a sandbox recipient

  1. Go to Mailgun Domains.
  2. Pick the sandbox domain (there should be only one in a free account).
  3. Enter the email you would like to use for testing and hit Save recipient button.
  4. Confirm the verification email in your email inbox.
3839

Send Email

  1. In administration, go to Email channel detail created in the previous step.
  2. Copy the "Channel ID" in detail page for later use.
  3. You will need your Amio account access_token. Go to Settings - API and copy your secret access token.
  4. Send email to your user using Send Text Message API.
curl -X POST \
  https://api.amio.io/v1/messages \
  -H 'authorization: Bearer {{access_token}}' \
  -H 'content-type: application/json' \
  -d '{
  "channel": {
    "id": "{{channel_id}}"
  },
  "contact": {
    "name": "Bill Crosby",
    "email": "[email protected]"
  },
  "content": {
    "type": "text",
    "payload": "Hello world!"
  },
  "metadata": {
     "email": {
        "subject": "Hello",
        "from": {
          "name": "Your Company",
          "email": "[email protected]"
        },
        "reply_to": {
           "name": "Customer Support",
           "email": "[email protected]"
        }
     }
  }
}
  1. Open your test email inbox and verify that the message was received.

📘

Postman

Use Postman to test all different message types. Don't forget to set environment properties: access_token, email.channel.id and email.contact.id.


What’s Next