उदाहरण भेज रहे
cURL के साथ भेजें
अपने सेटअप को जाँचने के लिए टर्मिनल से सीधे भेजें.
पूर्व आवश्यकताएँ
- एक Sendtern API कुंजी
SENDTERN_API_KEYके रूप में भंडारित - A terminal with
curlinstalled (it ships with macOS, Linux and Windows 10+)
- 1
ईमेल भेजें
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
जवाब जाँचें
एक सफल निवेदन ईमेल आईडी के साथ
200 OKलौटाता है. ईमेल को बाद में देखने के लिए इसका उपयोग करें.1{ 2 "id": "47be30ca-24b7-48fb-b35d-ff287b89e66d" 3}
उदाहरण प्रेषक को अपने सत्यापित डोमेन पर एक पता के साथ बदलें.