Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Mailman - Adding new subscribers via web using PHP
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mailman - Adding new subscribers via web using PHP



On 08/10/2007, Dan Shoop <email@hidden> wrote:

On Oct 6, 2007, at 2:28 PM, Steve Savery wrote:

I have a web site and a mailing list running both running on the same
Mac OS X Server 10.4 Mac. I would like to enable those who register to
the web site to simply tick a box on a form to have themselves
automatically added to the mailing list.


I've done the code, but while I am getting a TRUE response from the
command sent via PHP, the email address does not get added to the
mailing list.

WHAT command sent by php?

You could just submit the form info to the already existing mailman
CGI that accepts subscription requests. Works like a charm.

-dhan


Dan could you explain how I could use the CGI method, please? I would prefer not meddling with my system, if possible.

-Steve

When you say "register to the website," are you talking about Drupal or Wrodrpess or some system like that? Good luck, you'll have to modify the code by hand or find a plugin that does the trick.


There are three ways off the top of my head to programmatically add a user to the mailing list:
1. Shell out to /usr/share/mailman/bin/add_members from your CGI script.
2. Send an email to email@hidden from the person's email address from your script.
3. Use the Mailman CGI gateway (what you see when you go to /mailman/ listinfo/yourlist), e.g. by constructing an HTML form to subscribe the user using (view source on the listinfo pages to find out what your vars should be called). If you're AJAX-handy, use some jQuery to send the form in the background.


We need to know specific things about your system to help you in order to give you specific answers that may or may not involve meddling with your code. Otherwise, this is all speculation.:-)





- Fred Alger.
Technical Designer
email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Macos-x-server mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.