Send Email via REST APIPOST /api/v1/email/send
Developer Integration Examples
cURL REST API
curl -X POST https://smtp-relay.hitechcloud.vn/api/v1/email/send \
-H "Authorization: Bearer htc_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"from": "contact@hitechcloud.vn",
"to": "thanhan635916@gmail.com",
"subject": "HiTechMail API Delivery Test",
"html": "<h2>Hello World</h2>",
"priority": "P0"
}'Node.js / TypeScript
const res = await fetch('https://smtp-relay.hitechcloud.vn/api/v1/email/send', {
method: 'POST',
headers: {
'Authorization': 'Bearer htc_live_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: 'contact@hitechcloud.vn',
to: 'thanhan635916@gmail.com',
subject: 'HiTechMail API Delivery Test',
html: '<p>Message content</p>'
})
});
const data = await res.json();
console.log('Message ID:', data.messageId);SMTP Direct Relay
Host: smtp-relay.hitechcloud.vn
Port: 587 (STARTTLS) or 25
Auth: LOGIN / PLAIN
User / Pass: Your SMTP Username & API Key