21 lines
692 B
PHP
21 lines
692 B
PHP
<?php
|
|
|
|
# [subscribe.php]
|
|
#
|
|
# Subscribe an email address to a Mailman3 mailing list. The email address is taken from the query string, and
|
|
# the mailing list can be set to the variable below.
|
|
#
|
|
# Used the documentation at [https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/model/docs/subscriptions.html]
|
|
|
|
$MAILING_LIST = "sandbox-list@nugget.fun";
|
|
|
|
$ch = curl_init();
|
|
curl_setopt($ch, CURLOPT_URL, "http://localhost:8001/3.1/system/versions");
|
|
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
curl_setopt($ch, CURLOPT_USERPWD, "restadmin:GgzPdbc0rvvsWkHIhmGtjtbv0rmDlz0Y4zBjQv+kEjl6HvSS");
|
|
echo curl_exec($ch);
|
|
curl_close($ch);
|
|
|
|
?>
|