
The redirection feature adds a new way to use MailPost. This feature allows you to add those dropdown list boxes for URLs that seem to be so popular these days.
This was accomplished by first creating the list box in the form. We set the name of the listbox to *redirect* (this tells MailPost that this is to be used with redirection. All of your redirection listboxes will be named *redirect*).
Next, we edited the listbox. We placed what we wanted the user to see in the option's TEXT "setting". We placed the value that we'll use with MailPost in the option's VALUE setting.
<SELECT NAME="*redirect*" SIZE="5"> <OPTION VALUE="MailPost Homepage" SELECTED="SELECTED">MailPost Homepage</OPTION> <OPTION VALUE="--- --- ---">--- --- ---</OPTION> <OPTION VALUE="Test MailPost">Test MailPost</OPTION> <OPTION VALUE="--- --- ---">--- --- ---</OPTION> <OPTION VALUE="MailPost Help">MailPost Help Pages</OPTION> </SELECT>
Next, we edited a text file that we named redirect.txt to include these 3 URLs
MailPost Homepage || http://www.mcenter.com/mailpost/ Test MailPost || http://www.mcenter.com/mailpost/sample.html MailPost Help || http://www.mcenter.com/mailpost/help/
The format of the file to use with the redirection feature is simple.
You place the VALUE of the listbox's option followed by a space, two "|"
(sometimes called a pipe or bar) and another space, and then the URL to
send the user to.
Note: the redirect feature is case sensitive!! The text in your
option's VALUE setting must match exactly the text in the text file.
MailPost Help is NOT the same as MAILPOST Help.
The part of our text file (which we named redirect.txt) that works with these option values looks like this:
MailPost Homepage || http://www.mcenter.com/mailpost/ Test MailPost || http://www.mcenter.com/mailpost/sample.html MailPost Help || http://www.mcenter.com/mailpost/help/
After this, we set the form's action to call MailPost as we normally do.
Only this time, we specify the text file to use for the redirection,
instead of a template file. In our case, this file is called "redirection.txt."
Note that you can have multiple files that you can use with the
redirection feature. You could have all of your URLs listed in just one
file, which would make URL updates much easier, instead of changing
numerous text files. It's really up to you to decide if you'll use one
single file, or multiple files. Be aware that we do have a 30k limit on
these files.
So, for this example, our form's ACTION is set to:
ACTION="http://www.mcenter.com/cgi-win/mailpost.exe/mailpost/redirect.txt"
We advise that if you use the redirect feature, that you make one item in your list the "default" for that list. If no "default" is specified, MailPost will return an error message that would not make sense to your users.
If you include "placeholders" in your pulldown list (like "--------" or a bunch of spaces) MailPost will redirect the user back to the HTTP_REFERER page.