[Mailman-Users] add_members and email confirmation

Ren Bucholz ren at trubble.com
Fri Oct 21 20:23:35 CEST 2005


I have a signup sheet that subscribes people to a Mailman list by using 
PHP to call add_members (the PHP is below, FYI).  My problem is that 
add_members seems to ignore the email confirmation settings from the 
admin interface.  Even though my list is configured to send a 
confirmation message, subscribers only get the "Thanks for signing up!" 

Does anyone know of a way to use add_members in a confirmed-opt-in 
list?  Thanks very much!



<h2>Subscription Results</h2>


// The path to your add_members program here:
$ADD_MEMBERS = '/your/path/to/add_members';

// The name of your mailing list:
$LIST = 'FakeList';

// The email address from the form, run through a process
// that removes nasty scripting attacks
$adrs = escapeshellcmd($_GET['email']);

// Runs the pipeline and stores the output in an array
exec("echo $adrs | $ADD_MEMBERS -r - $LIST", $output, $return_var);

// Implodes the array into a string
$msg = implode('', $output);

// Search for 'Subscribed' in $msg. Then we know if it worked or not.

if (strpos($msg, 'Subscribed') === FALSE) {
   print "Crap!  Something went wrong and you were not subscribed.";
} else {
   print "It worked!";


More information about the Mailman-Users mailing list