Örnekler gönderiliyor

cURL ile gönder

Terminalden doğrudan gönder, kurulumunu test et.

Önkoşullar

  • SENDTERN_API_KEY olarak depolanan bir Sendtern API anahtarı
  • A terminal with curl installed (it ships with macOS, Linux and Windows 10+)
  1. 1

    E-posta gönder

    Run this in your terminal.

    1curl -X POST https://sendtern.com/emails \
    2  -H "Authorization: Bearer $SENDTERN_API_KEY" \
    3  -H "Content-Type: application/json" \
    4  -d '{
    5    "from": "Acme <hello@mail.example.com>",
    6    "to": ["you@example.com"],
    7    "subject": "Hello from the terminal",
    8    "html": "<p>It works!</p>"
    9  }'
    
  2. 2

    Cevapları kontrol et.

    Başarılı bir talep e-posta kimliğiyle 200 OK'yi geri verir. Daha sonra e-postayı aramaya kullanın.

    1{
    2  "id": "47be30ca-24b7-48fb-b35d-ff287b89e66d"
    3}
    

Örnek göndericiyi verilen alan adı adresinizle değiştirin.