You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 13, 2026. It is now read-only.
so I don't want/don't have the time to learn git right now but have written some lines to syncMembers. In Mailman Version 2.1.33 I do have that functionality - so here is the according function to add in api.php. Maybe someone is interested.
/**
* Sync Members to a Mailman List
* @param $members
* Array of Members that should be synced
* @return
* Array of Members that were successfully synced
*/
public function syncMembers($members) {
$token = $this->getCSRFToken("sync");
$response = $this->client->request('POST', $this->mailmanURL . '/members/sync', [
'form_params' => [
'csrf_token' => $token,
'memberlist' => join(chr(10), $members),
'setmemberopts_btn' => 'Änderungen speichern'
]
]);
return $this->parseResultList($response->getBody());
}
And the example to call it
$mailman = new MailmanAPI($mailManBaseURL,$adminPW);
$currentMembers = $mailman->syncMembers(["member1@domain.com","member2@domain.com"]);
Note:
It only returns the newly added members, not the deleted ones.
As written in my mail, I had to use "use splattner\mailmanapi;" first and then the class call is accordingly "new splattner\mailmanapi\MailmanAPI"
Hey there,
so I don't want/don't have the time to learn git right now but have written some lines to syncMembers. In Mailman Version 2.1.33 I do have that functionality - so here is the according function to add in api.php. Maybe someone is interested.
And the example to call it
Note: