Home
 

Customer Support

Search for keywords:

Browse by category:

How do I let people subscribe to my Mailman list using a homemade PHP script?

On your webpage, you can have people fill out a HTML form to subscribe to your mailing list instead of having them visit the Mailman Subscription page. The following sample PHP code sends a subscription confirmation message to the email address the user submits.

<?
if($_POST["Email"])
{
$maillist_address = "yourlist-join@yourdomain.com";
$subject = "";
$body = "";
$headers = "From: " . $_POST["Email"];

if (mail("$maillist_address",
"$subject",
"$body",
"$headers"))
{
print "Thank you. A subscription confirmation has been sent.";
}else{
print "The subscription request failed.n Perhaps the email is not valid orn
the mail server could not be contacted.n";
}
}
?>

<FORM method="post" action="<?= $PHP_SELF; ?>">
Subscribe my email address:
<INPUT name="Email" size="20" type="text" maxlength=100><br>
<INPUT type="submit" name="Submit" value="Submit">
</form>


"your-list" is the name of your mailing list. If you don't know your list name, it is listed as the "public name" in the General Options section of your list administration page. "yourdomain.com" is the domain name you host at Modwest which uses the Mailman service.

User-Contributed Notes

add a note
There are no user-contributed notes for this topic.

Related Questions:


How do I make an "Announce Only" newsletter with Mailman 2.1.x?

How do I use Mailman's email interface?

Can I use a mailing list or newsletter to send bulk email?

Can I use a listserver or mailing list?

Can I put a header and footer on the beginning and end of every post to a Mailman list?

How do I set up SendStudio?

How do I subscribe a large volume of new members to our Mailman mailing list?

Why is the NOMAIL checkbox checked on some Mailman subscribers?

What does the Mailman "return replies to poster" feature do?

Are there any offsite mailing list alternatives?

Browse Categories:

Getting Started, FTP, Telnet/SSH, Moving Domains, E-mail, Traffic Reports, Mailing Lists, Apache, PHP, CGI, Other Server-Side Scripting, MySQL Database, Imaging Libraries, Other Software, Billing & Terms, Control Panel, E-commerce, Pre-Sales


Tiny Modwest Logo         Copyright 2000-2008 by Modwest, Inc.          About Us    |    Blog    |    Jobs    |    Web Design    |    Contact Us