Details on Combining a Response Form with a Newsletter Subscription
This is a question I received from one of my Doctor Ebiz subscribers that needs a more detailed explanation than I have room for in Doctor Ebiz:
"I'm getting quite a list of questions submitted through my website. It takes time to determine who has checked "yes" to subscribe and to subscribe them to my newsletter, leaving the "not" people unsubscribed. Some subscribe themselves, but some don't, assuming I will do it. I'm sure you get many more queries than I do. How do you keep track of questions submitted and subscriptions requested?" -- Lois Turley, www.AllergyNursing.com
Most listservers have an e-mail address that will subscribe anyone who sends an e-mail to a certain address. For example, for YahooGroups.com the syntax is: groupname-subscribe@yahoogroups.com. For Lyris the syntax is join-listname@lyris_server_name.com. The strategy is to send an e-mail to this address from your forms-to-email program when someone wants to subscribe. It doesn't matter if this e-mail is blank or the body contains other information, the subscribe process works anyway.
FormMail.pl
One of the most popular freeware forms-to-email scripts is FormMail by Matt Wright, found in Matt's Script Archive (www.worldwidemart.com/scripts/formmail.shtml). Once you have a little experience with CGI programs, you could use the following trick. Take a deep breath; this gets technical very fast.
1. Edit FormMail.pl
Edit the FormMail.pl program your cgi-bin directory so that your domain and the domain of your listserver are included in the @referrers array. This allows e-mails to be sent to either domain. Here's what the Perl code looks like.
# @referers allows forms to be located only on servers which are defined ## in this field. This security fix from the last version which allowed #
# anyone on any server to use your FormMail script on their web site. #
@referers = ('your_url.com','yahoogroups.com');
If you don't add your listserver's domain to @referers there is no simple way to have FormMail.pl send e-mail to a domain. If you don't have access to the FormMail program on your webserver, you may have to ask support to do this for you.
2. Edit the Form on Your Webpage
The form on your webpage would include at a minimum:
- Your e-mail address as "recipient" in a hidden field near the top of the form,
- A text box for the visitor to put his or her e-mail address for a field called "email", and
- A "subscribe me" checkbox for the field "recipient" that includes both your e-mail address AND the subscribe e-mail address of your listserver, separated by a comma.
If the "subscribe me" checkbox is unchecked, the e-mail goes only to you. If the box is checked the e-mail goes to both you and the subscribe address of your listserver. Now subscriptions will take place automatically, and all you need to concern yourself with is answering your customer's question.
Here's an example. First, this is what a simple form would look like to a visitor. (Note: This form has been disabled purposely.)
Here's what the HTML code for this simple form looks like:
<FORM ACTION="http://www.your_url.com/cgi-bin/FormMail.pl" METHOD="POST"><input type="hidden" name="recipient" value="your_email@your_url.com">
Your Full Name <input type="text" name="realname" size="25">
<br>
Your E-mail <input type="text" name="email" size="40">
<br>
<input type="checkbox" name="recipient" value="your_email@your_url.com,sample-subscribe@yahoogroups.com">Subscribe Me to Your Newsletter
<p>
Your Comments:
<br>
<textarea name="Comments" rows="3" cols="40"></textarea>
<p>
<center><input type="submit"></center>
</FORM>
It is vital that the containing the HIDDEN input tag containing the default "recipient" e-mail address appear FIRST in the form. The checkbox must appear AFTER it, so that, if checked, this field is the last "recipient" field that your web browser reads.
FormHandler.cgi
My favorite CGI forms-to-email program is FormHandler.cgi which is found in the CGI/Perl Cookbook, by Craig Patchett and Matthew Wright (John Wiley & Sons, 1997; ISBN 0-471-16896-3). It is a juiced-up version of FormMail with many other features built in. With FormHandler.cgi all you'd need to do is set the checkbox for a field named "cc" and put the listserver subscribe address there (p. 77). If checked, the form would then e-mail a carbon copy of the response to listserver which subscribes your visitor.
cgiemail
Another excellent forms-to-email program is cgiemail (http://web.mit.edu/wwwdev/cgiemail/), written in C (Unix only) for MIT by Bruce Lewis. This allows you to design the format of the e-mail that is sent in a text file. It's an easy matter to include a CC: field that is filled by the subscribe e-mail address only when the checkbox is checked.
ColdFusion
If you're using ColdFusion, the CFMAIL tag allows you to specify a CC: field.
Support Issues
If you're a novice, installing CGI forms and getting them to work is tricky -- and frustrating. PLEASE resist the temptation of asking me to help you do this. I just don't have the time or staff for this. Instead, ask your Web designer, web hosting support, or programmer to assist you.
Sample newsletter. We respect your privacy and never sell or rent our subscriber lists. Subscribing will not result in more spam! I guarantee it!

