Topics Map > Communication & Collaboration > Email & Calendaring > Listserv
How do I manage listserv subscriptions in FormMail?
This article details how to use FormMail for self-subscription to a listserv.
This example demonstrates the use of FormMail for self-subscription to a listserv.
Form
<html> <head><title>Just testing</title></head> <body> <form method="post" action="http://www.uic.edu/htbin/cgiwrap/bin/formmail/FormMail/depts/accc/webpub/formmail/example-8.txt"> <h1>Example of FormMail 3.0</h1> This example shows the use of mail for listserv subscriptions. Note that listserv needs the email address <i>and</i> full name. Also note that listserv will send the subscriber confirmation mail before actually subscribing them. <hr> <p> My email address is: <input type="text" name="email" > <p> My full name is: <input type="text" name="name" > <p> <input type="submit" value="Submit your comments"> </form> </body> </html>
Configuration file
<!DOCTYPE form SYSTEM 'FormMail-3.0.dtd'> <form name="example3" > <!-- I really want your email address --> <validate name="email" public="Your email address" vtype="email"> <!-- This checks for nonnull, but additionally listserv insists on firstname and lastname --> <validate name="name" public="Your full name" vtype="nonnull"> <!-- Mail will not be sent in this example. Remove 'nomail' if you are really using this. And, of course, replace 'myspeciallist' with the true list name. --> <mail name="mail1"> <to>listserv@listserv.uic.edu <reply-to>$email <from>$email <Subject> <body> subscribe myspeciallist $name </mail> <!-- Here's the html response header Note that the full html page is generated, including the <html>...</html> tags --> <response name="r0" > <![CDATA[ <html> <head> <title>Test</title> </head> <body> <h1>Thank You for Subscribing</h1> <p> You will hear back from listserv shortly about your subscription to myspeciallist@uic.edu </p> </body> </html> ]]> </response> </form>