Use the following Sample Code to send email using MassMailer Developer API:


Cloudrop.MassMailerAPIService.sendEmail('{ "sender": { "fromName": "Siva Devaki", "fromAddress": "siva.devaki@massmailer.io" }, "receipient": { "subject": "Demo Email", "replyTo": "siva.devaki@massmailer.io", "query": "SELECT Id FROM Contact WHERE FirstName=\'Siva\'", "objectName": "Contact", "cc": "siva@massmailer.io", "bcc": "siva@massmailer.io" }, "options": { "unsubGroupId": "<enter the unsubscribe group id>", "scheduleDateTime": null }, "email": { "text": "Sample TEXT BODY", "template": "", "html": "<html><body>Sample HTML BODY</body></html>", "attachments": "" } }');