Information about ninjaMail, API usage, examples, etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

22 lines
647 B

<?php
include "ninjamail.class.php";
// Mail
$mail = new ninjaMailSend('https://admin.dimail.hu', 'API_KEY');
$mail->to('[email protected]');
$mail->subject('Hello');
$mail->message('HTML_CONTENT', 'TEXT_CONTENT');
var_dump($mail->send());
// Newsletter
$newsletter = new ninjaMailNewsletter('https://admin.dimail.hu', 'API_KEY');
$newsletter->subject('New subject');
$newsletter->message('HTML_CONTENT', 'TEXT_CONTENT OR NULL');
if ($newsletter->update() && $newsletter->send())
echo "updated & sent\n";
// Stats
$stat = new ninjaMailStatistics('https://admin.dimail.hu', 'API_KEY');
print_r($stat->get(3512201));