एपीआई उदाहरण

PHP के साथ CURL-रहित विधि का उपयोग करके
POST अनुरोध करें

<?php $url = 'https://rsXXX-api.realsender.com/mail/send'; $data = array('apiuser' =>'वह जो हमने आपको प्रदान किया', 'apipass' => 'वह जो हमने आपको प्रदान किया', 'from' => 'sender@example.com', 'to' => 'recipient@example.com', 'subject' => 'संदेश का विषय', 'text' => 'साधारण पाठ में ईमेल बॉडी', 'html' => 'HTML प्रारूप में ईमेल बॉडी'); // यदि आप अनुरोध https://... पर भेजते हैं तो भी 'http' कुंजी का उपयोग करें $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data), ), ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); var_dump($result); ?>

POST अनुरोध
CURL विधि

curl -d 'apiuser=वह पासवर्ड जो हमने आपको दिया है&apipass=वह पासवर्ड जो हमने आपको दिया है&from=sender@example.com&to=recipient@example.com&subject=संदेश का विषय&text=ईमेल का मुख्य भाग (साधारण टेक्स्ट में)&html=ईमेल का मुख्य भाग (HTML प्रारूप में)'https://rsXXX-api.realsender.com/mail/send

API के उदाहरण (संलग्नक सहित)