[Mailman-Users] Subscribe/unsubscribe with CGI script?
Tom Browder
tom.browder at gmail.com
Mon May 13 13:39:40 CEST 2013
I am running Mailman 2 (from package on Debian 6) and am trying to
build my own subscription page with a Perl cgi script.
I viewed the page source of a typical subscription page to find how it
normally works.
I get to the point of subscription and, using modules LWB::UserAgent
and URI::Esacpe do;
my $browser = LWP::UserAgent->new;
# may need to url encode the e-mail
my $enc_email = uri_escape($email);
my $enc_name = uri_escape($fullname);
my $response = $browser->post(
"https://host.org/cgi-bin/mailman/$oper/$list",
email => $enc_email,
fullname => $enc_name,
);
if ($response->is_success) {
$resp = $response->decoded_content; # or whatever
}
else {
die $response->status_line;
}
When using real data I get the following response from Mailman
<quote>
listname Subscription results
You must supply a valid email address.
</quote>
and of course nothing happens.
Any ideas or criticisms are appreciated.
Best regards,
-Tom
More information about the Mailman-Users
mailing list