4.33. How do I put a subscribe form for my list on a web page?
Cut and paste the code below into the HTML of your web page. Replace XYZ with the name of your list and adjust the action= URL as required for your mailman installation.
The only required parts of this form are the email text box and the submit button - edit or remove the others as you like.
Beginning with Mailman 2.1.16, a site can choose to add a dynamically generated hidden hash to the subscribe form. If that is done, static forms such as below will not work. See the information in Defaults.py for the SUBSCRIBE_FORM_SECRET setting for more information.
<h2>Join the XYZ list</h2> <form method="post" action="http://example.org/mailman/subscribe/XYZ"> Your E-mail address: <input name="email"> Your Name (optional): <input name="fullname"> <p>You may enter a privacy password below. This provides only mild security, but should prevent others from messing with your subscription. <strong>Do not use a valuable password</strong> as it will occasionally be emailed back to you in cleartext. If you choose not to enter a password, one will be automatically generated for you, and it will be sent to you once you've confirmed your subscription. You can always request a mail-back of your password when you edit your personal options.</p> <p>Password choice: <input type="password" name="pw"> Confirm Password: <input type="password" name="pw-conf"></p> <p>Would you like to receive list mail batched in a daily digest? (You may choose NoMail after you join.) <input type="radio" name= "digest" value="0" checked> No <input type="radio" name="digest" value="1"> Yes</p> <p><input type="submit" name="email-button" value= "Subscribe"></p> </form>
Converted from the Mailman FAQ Wizard
This is one of many Frequently Asked Questions.