Quickstart¶
This guide takes you from the order to the first delivered message, over SMTP and over the API.
1. Place the order and wait for activation¶
Activation is assisted. There is no self-service signup or customer panel yet.
- Place the order at https://www.frontengine.net/en.
- Our team creates your organization, a server for your application, and links your sending domain.
- You receive the server credentials and the list of DNS records to publish.
The key is shown only once
Store the key in a secrets vault as soon as you receive it. We cannot show it again. If it is lost, ask for a new one at [email protected]. See Account, servers and credentials.
2. Publish the DNS records¶
Publish the records we send you in your domain's DNS: the verification TXT, the DKIM key, SPF and, preferably, the return path CNAME. The walkthrough is in Set up a sending domain.
Sending from the domain depends on the verification TXT. The DKIM signature is applied only after the key is published.
3. Keep the credential in environment variables¶
The examples in this documentation use these variables:
export FRONTENGINE_KEY_ID="AKIA................" # credential identifier
export FRONTENGINE_KEY="your-key" # credential key
4. Send the first message over SMTP¶
With swaks installed:
swaks --server smtp-out.frontengine.net --port 587 --tls \
--auth LOGIN --auth-user frontengine --auth-password "$FRONTENGINE_KEY" \
--from [email protected] --to [email protected] \
--header "Subject: First send through FrontEngine" \
--body "It worked."
The reply 250 2.0.0 Ok: queued as ... means the message was accepted and queued. Details in Sending over SMTP.
5. Send the first message over the API¶
curl -sS https://api.frontengine.net/api/v1/send/message \
-H "X-Server-API-Key: $FRONTENGINE_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "My Store <[email protected]>",
"to": ["[email protected]"],
"subject": "First send over the API",
"plain_body": "It worked."
}'
import os
import requests
r = requests.post(
"https://api.frontengine.net/api/v1/send/message",
headers={"X-Server-API-Key": os.environ["FRONTENGINE_KEY"]},
json={
"from": "My Store <[email protected]>",
"to": ["[email protected]"],
"subject": "First send over the API",
"plain_body": "It worked.",
},
timeout=30,
)
body = r.json()
print(body["status"], body["data"])
Response:
{
"status": "success",
"time": 0.042,
"flags": {},
"data": {
"message_id": "[email protected]",
"messages": {
"[email protected]": { "id": 1042, "token": "Zp3kQ9xT" }
}
}
}
Check the status field, not only the HTTP code
The API answers HTTP 200 for authentication and validation errors too. The verdict is in the status field of the JSON: success, error or parameter-error. See Sending API.
6. Follow the delivery¶
- Look the message up by the
idreturned on send: Message status. - Ask for a webhook to be configured to receive delivery events: Webhooks.