Unsubscribe Link With Master Form V4
By
Will Bontrager
When you need to publish an unsubscribe link in emails, the Master Form V4 form handler can be used to record the unsubscribing addresses. The addresses can be put into a database file and/or emailed to you.
Whether or not the email address of the recipient is contained within the unsubscribe link published in the outgoing email will determine how Master Form V4 is used.
If the recipient's email address can not be contained in the unsubscribe link, a link to a Master Form V4 form can be published. The form asks for the email address the email was sent to. The email recipient clicks the button. Master Form V4 stores the address in a file on the server and sends the browser to a thank-you page.
On the other hand, if the email address can be contained in the unsubscribe link of the outgoing email, an unsubscribe link URL something like this can be published:
http://example.com/unsub.php?recipient@email.com
When the link is clicked, the recipient's browser is sent to the URL. The script presented in this blog post creates a new URL of information Master Form V4 requires and then redirects the browser to it.
Master Form V4 stores the address in a file on the server and sends the browser to a thank-you page.
Two versions of the relay script are below, one PHP and one Perl CGI.
PHP:
Perl CGI:
Both versions of the relay script require some customization. Instructions are in the scripts themselves. (Instructions for Master Form V4 are in the Master Form V4 Users' Manual.)
The scripts are designed so information other than, or in addition to, an email address can be put into the link. The subscriber's name, for example. Like the Master Form V4 form handler itself, the scripts are quite versatile.
April 24, 2008
Please note:
Articles on this website are presented "as is". However -
If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Ask one of our Experts and you'll have your answer!
Click here for details.
Rate this blog post.
No page reload!