Skip to content

Commit

Permalink
Using webdev toolbar to confirm the form from POST to GET I was able …
Browse files Browse the repository at this point in the history
…to get the correct URL string and make amendments
  • Loading branch information
hm2k committed Jan 21, 2012
1 parent 85cbe97 commit c21be8a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Services/Mailman.php
Expand Up @@ -301,9 +301,10 @@ public function unsubscribe($email)
/**
* Subscribe
*
* (ie: <domain.com>/mailman/admin/<listname>/members/add?subscribe_or_invite=0
* &send_welcome_msg_to_this_batch=0&notification_to_list_owner=0
* &subscribees_upload=<email-address>&adminpw=<adminpassword>)
* (ie: http://example.co.uk/mailman/admin/test_example.co.uk/members/add
* ?subscribe_or_invite=0&send_welcome_msg_to_this_batch=1
* &send_notifications_to_list_owner=0&subscribees=test%40example.co.uk
* &invitation=&setmemberopts_btn=Submit+Your+Changes)
*
* @param string $email Valid email address to subscribe
* @param boolean $invite Send an invite or not (default)
Expand All @@ -315,8 +316,8 @@ public function subscribe($email, $invite = false)
$path = '/' . $this->list . '/members/add';
$query = array('subscribe_or_invite' => (int)$invite,
'send_welcome_msg_to_this_batch' => 0,
'notification_to_list_owner' => 0,
'subscribees_upload' => $email,
'send_notifications_to_list_owner' => 0,
'subscribees' => $email,
'adminpw' => $this->adminPW);
$query = http_build_query($query, '', '&');
$url = $this->adminURL . $path . '?' . $query;
Expand Down

0 comments on commit c21be8a

Please sign in to comment.