Mailtarget Documentation

Getting Started Email Transactional

This is a quick tutorial to get you started using our API. We will show you how to send your first email, how to authenticate with our API and tell you more about Mailtarget RESTful API.

Make Your First Request

Give it a go and send your first email. This simple example shows how to send an email with the API in a few easy steps.

  1. You need to enter API_KEY. You will need API_KEY for accessToken. To get access to Transactional Mailtarget, you need API_KEY which you can get in the menu Transactional Email > Domain Management through the Mailtarget Apps.
  2. After you got your API_KEY you need to find your credentials, the API Key in the Domain Information section.
curl -s -X POST https://trx.mailtarget.co/outbox -H 'Content-Type: application/json' -d '{ "accessToken": "$MT_APIKEY", "from": "$SENDER_EMAIL", "to": [ "$RECIPIENT_EMAIL" ], "labels": [ "$LABEL_EMAIL" ], "subject": "Hello", "content": "<!DOCTYPE html><html><head><meta charset=\"utf-8\"/><title>Hello</title></head><body><h3>My First Email Sent by Mailtarget</h3></body></html>", "track": true }'
ParameterDescription
$MT_APIKEYYour API Key
$SENDER_EMAILSender email address with domain of your register
$RECIPIENT_EMAILRecipient email address of your test
$LABEL_EMAILLabel email which you use for view report easily