<?php
$url = 'https://api.rsprint.site/api/v1/gateway/email-send-message';
$headers = [
'X-API-Key: YOUR_API_KEY',
'X-API-Secret: YOUR_API_SECRET',
'Content-Type: application/json'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"to":"client@example.com","subject":"Payment Confirmation","body":"Your payment of INR 500 has been credited."}');
$res = curl_exec($ch);
echo $res;