Am trying to using Services Mailman php api to add emails to a mailing list created at the backend with the site cpanel but no email is being added.
Here is my code
require './Services/Mailman.php';
$mm = new Services_Mailman( 'http://example.com/mailman/admin/', 'newsletter', NEWSLETTER_PASS );
try {
// $mailinglists = $mm->lists();
// foreach ( $mailinglists as $list ) {
// echo $list['name'] . "\n";
// }
var_dump( $mm->subscribe('kelly@example.com') );
} catch ( Services_Mailman_Exception $e ) {
die( 'Error: ' . $e->getMessage() );
}
Here is a screenshot of my var_dump
I don't what the problem could be, is it the admin url that i am using or is it something else because everything from the mailing list password and list name provided are correct. Please help. Thank you.